def to_id(s):
 if (s == '+'):
  return 11
 if (s == '*'):
  return 12
 return (int(s) + 1)

def to_id ( s ) : if ( s == '+' ) : return 11 if ( s == '*' ) : return 12 return ( int ( s ) + 1 )
covert text to ids .