import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Reader src = new InputStreamReader(System.in);
		BufferedReader in = new BufferedReader(src);
		String line;
		while ((line = in.readLine()) != null)
		{
			System.out.println(toTokens(line));
		}
	}
	
	static enum TokenType
	{
		INTEGER, FLOAT, STRING, NAME, OPERATOR, COMMENT,
		COMMA, COLON, OPENBR, CLOSEBR, OPENAR, CLOSEAR,
		SEMICOLON
	}
	
	static class Token
	{
		public final TokenType type;
		public final String string;
		Token(String string, TokenType type)
		{
			this.type = type;
			this.string = string;
		}
		@Override public String toString()
		{
			return this.string;
		}
	}
	
	static List<Token> toTokens(String line)
	{
		Pattern ptInt = Pattern.compile("^[0-9]+");
		Pattern ptDbl = Pattern.compile("^(([0-9]+)?[.][0-9]+|[0-9]+#)");
		Pattern ptStr = Pattern.compile("^\"([^\"]|\"\")+\"");
		Pattern ptName = Pattern.compile("^[a-zA-Z][a-zA-Z0-9]*(%|#|[$])?");
		Pattern ptOpe = Pattern.compile("^(>=|<=|<>|[-/<>^=\\\\]|[+]|[*])");
		Pattern ptCmt = Pattern.compile("^([Rr][Ee][Mm] |')");
		Matcher matcher;
		List<Token> list = new ArrayList<Token>();
		int index = 0;
		int len = line.length();
		while (index < len)
		{
			String target = line.substring(index);
			if ((matcher = ptCmt.matcher(target)).lookingAt())
			{
				index = line.length();
				list.add(new Token(target, TokenType.COMMENT));
			}
			else if ((matcher = ptDbl.matcher(target)).lookingAt())
			{
				index += matcher.end();
				list.add(new Token(matcher.group(), TokenType.FLOAT));
			}
			else if ((matcher = ptInt.matcher(target)).lookingAt())
			{
				index += matcher.end();
				list.add(new Token(matcher.group(), TokenType.INTEGER));
			}
			else if ((matcher = ptStr.matcher(target)).lookingAt())
			{
				index += matcher.end();
				String temp = matcher.group();
				temp = temp.substring(1, temp.length() - 1);
				temp = temp.replaceAll("\"\"", "\"");
				list.add(new Token(temp, TokenType.STRING));
			}
			else if ((matcher = ptName.matcher(target)).lookingAt())
			{
				index += matcher.end();
				list.add(new Token(matcher.group().toUpperCase(), TokenType.NAME));
			}
			else if ((matcher = ptOpe.matcher(target)).lookingAt())
			{
				index += matcher.end();
				list.add(new Token(matcher.group(), TokenType.OPERATOR));
			}
			else if (target.startsWith("("))
			{
				index++;
				list.add(new Token("(", TokenType.OPENBR));
			}
			else if (target.startsWith(")"))
			{
				index++;
				list.add(new Token(")", TokenType.CLOSEBR));
			}
			else if (target.startsWith("["))
			{
				index++;
				list.add(new Token("[", TokenType.OPENAR));
			}
			else if (target.startsWith("]"))
			{
				index++;
				list.add(new Token("]", TokenType.CLOSEAR));
			}
			else if (target.startsWith(","))
			{
				index++;
				list.add(new Token(",", TokenType.COMMA));
			}
			else if (target.startsWith(":"))
			{
				index++;
				list.add(new Token(":", TokenType.COLON));
			}
			else if (target.startsWith(";"))
			{
				index++;
				list.add(new Token(";", TokenType.SEMICOLON));
			}
			else if (target.startsWith(" "))
			{
				index++;
			}
			else
			{
				System.out.println("Unknown: " + target.substring(0, 1));
				index++;
			}
		}
		return list;
	}
}