The problem describes the properties of a command line. The description somehow resembles the one you usually see in real operating systems. However, there are differences in the behavior. Please make sure you've read the statement attentively and use it as a formal document.

In the Pindows operating system a strings are the lexemes of the command line — the first of them is understood as the name of the program to run and the following lexemes are its arguments. For example, as we execute the command " run.exe one, two . ", we give four lexemes to the Pindows command line: "run.exe", "one,", "two", ".". More formally, if we run a command that can be represented as string s (that has no quotes), then the command line lexemes are maximal by inclusion substrings of string s that contain no spaces.

To send a string with spaces or an empty string as a command line lexeme, we can use double quotes. The block of characters that should be considered as one lexeme goes inside the quotes. Embedded quotes are prohibited — that is, for each occurrence of character """ we should be able to say clearly that the quotes are opening or closing. For example, as we run the command ""run.exe o" "" " ne, " two . " " ", we give six lexemes to the Pindows command line: "run.exe o", "" (an empty string), " ne, ", "two", ".", " " (a single space).

It is guaranteed that each lexeme of the command line is either surrounded by spaces on both sides or touches the corresponding command border. One of its consequences is: the opening brackets are either the first character of the string or there is a space to the left of them.

You have a string that consists of uppercase and lowercase English letters, digits, characters ".,?!"" and spaces. It is guaranteed that this string is a correct OS Pindows command line string. Print all lexemes of this command line string. Consider the character """ to be used only in order to denote a single block of characters into one command line lexeme. In particular, the consequence is that the given string has got an even number of such characters.


-----Input-----

The single line contains a non-empty string s. String s consists of at most 10^5 characters. Each character is either an uppercase or a lowercase English letter, or a digit, or one of the ".,?!"" signs, or a space.

It is guaranteed that the given string is some correct command line string of the OS Pindows. It is guaranteed that the given command line string contains at least one lexeme.


-----Output-----

In the first line print the first lexeme, in the second line print the second one and so on. To make the output clearer, print the "<" (less) character to the left of your lexemes and the ">" (more) character to the right. Print the lexemes in the order in which they occur in the command.

Please, follow the given output format strictly. For more clarifications on the output format see the test samples.


-----Examples-----
Input
"RUn.exe O" "" "   2ne, " two! . " "

Output
<RUn.exe O>
<>
<   2ne, >
<two!>
<.>
< >

Input
   firstarg   second   ""    

Output
<firstarg>
<second>
<>

Difficulty: interview

Starter code:

Solutions:
import re
from collections import Counter

class Task:
	answer = []
	str = ""
	
	def getData(self):
		x = 0
		self.str = input()
	
	def solve(self):
		list = re.findall("\".*?\"|[^ ]+", self.str)
		self.answer = ["<" + x.replace("\"", "") + ">" for x in list]
	
	def printAnswer(self):
		for x in self.answer:
			print(x)

task = Task();
task.getData();
task.solve();
task.printAnswer();


def printtag(s):
    print("<" + s + ">")

s = input()
l = s.split("\"")
non_modify = 0
for s in l:
    if non_modify:
        printtag(s)
    else:
        tmp_lst = s.split(" ")
        for st in tmp_lst:
            if len(st):
                printtag(st)
    non_modify = 1 - non_modify

import sys
# f = sys.stdin
# f = open("input.txt", "r")
a = input()
i = 0
while i < len(a):
    if a[i] == '"':
        end = a.index('"', i+1)
        print("<", a[i+1:end], ">", sep="")
        i = end+1
    elif a[i] != " " != '"' and (a[i-1] == " " or i-1 < 0):
        try:
            end = a.index(" ", i+1)
        except:
            end = len(a)
        print("<", a[i:end], ">", sep="")
        i = end+1
    else:
        i += 1

s = input()

inside = False
lexeme = []
for c in s:
    if c == '"':
        if inside:
            inside = False
            print("%s>" % ''.join(lexeme))
            lexeme = []
        else:
            lexeme = ['<']
            inside = True
    elif c == ' ':
        if inside:
            lexeme.append(c)
        elif len(lexeme):
            print("%s>" % ''.join(lexeme))
            lexeme = []
    else:
        if len(lexeme):
            lexeme.append(c)
        else:
            lexeme = ['<', c]
if len(lexeme):
    print("%s>" % ''.join(lexeme))


ans, t = [], input()
i, j = 0, -1
while i < len(t):
    if t[i] == '"':
        ans += t[j + 1 : i].split()
        i += 1
        j = t.find('"', i)
        ans.append(t[i : j])
        i = j
    i += 1
ans += t[j + 1:].split()
for i in ans:
    print('<' + i + '>')

def main(s):
    type = 0
    temp = ''
    answer = []

    #type:
    #0 - обычный поиск
    #1 - внутри кавычек

    for c in s:
        if type==0:
            if c==' ':
                if temp!='':
                    answer.append(temp)
                    temp=''
            elif c=='\"':
                if temp!='':
                    answer.append(temp)
                    temp = ''
                type = 1
            else:
                temp+=c
        elif type==1:
            if c=='\"':
                type = 0
                answer.append(temp)
                temp = ''
            else:
                temp+=c

    if type==0 and temp!='':
            answer.append(temp)

    q = ''
    for item in answer:
        q+='<'+item+'>\n'

    return q[:-1]

def init():
    s = input()

    print(main(s))

init()

cmd = input()
lexems = []

tmp = ""
bracket = False
word = False

for i in range(len(cmd)):
    if cmd[i]==" ":
        if bracket:
            tmp+=cmd[i]
        elif word:
            lexems.append(tmp)
            tmp=""
            word = False
    elif cmd[i]=='"':
        if bracket:
            lexems.append(tmp)
            tmp=""
            word = False
            bracket = False
        else:
            bracket = True
            word = True
    else:
        tmp+=cmd[i]
        word = True
if tmp!="":
    lexems.append(tmp)
    
for i in lexems:
    print("<",i,">",sep="")


end = {'q': '"', 'w': ' '}
l, cur, st = [], [], 'n'
for ch in input() + ' ':
    if st in 'wq':
        if ch == end[st]:
            l.append(''.join(cur))
            cur = []
            st = 'n'
        else:
            cur.append(ch)
    elif ch == '"':
        st = 'q'
    elif ch != ' ':
        st = 'w'
        cur.append(ch)
for lx in l:
    print('<', lx, '>', sep='')


s = input().split('"')
for i in range(len(s)):
	if i % 2:
		print('<', s[i], '>', sep='')
	else:
		l = [x for x in s[i].split() if x != '']
		if l != []:
			print('<', '>\n<'.join(l), '>', sep='')


a=input()
m=0
b=[]
c=''
for i in a.strip():
    if m==0:
        if i==' ':pass
        elif i=='"':m=2
        else:m=1;c+=i
    elif m==1:
        if i==' ':m=0;b+=[c];c=''
        else:c+=i
    elif m==2:
        if i=='"':m=0;b+=[c];c=''
        else:c+=i
for i in b:print('<'+i+'>')
if c:print('<'+c+'>')


def main():
    res = []
    for i, s in enumerate(input().split('"')):
        if i & 1:
            res += ["<", s, ">\n"]
        else:
            for t in s.split():
                res += ["<", t, ">\n"]
    print(''.join(res), end='')


def __starting_point():
    main()

__starting_point()

import re, sys, math, string, operator, functools, fractions, collections
import os
sys.setrecursionlimit(10**7)
dX= [-1, 1, 0, 0,-1, 1,-1, 1]
dY= [ 0, 0,-1, 1, 1,-1,-1, 1]
RI=lambda: list(map(int,input().split()))
RS=lambda: input().rstrip().split()
mod=1e9+7
#################################################
s=input()+' '
ans=[]
i,j=0,-1
while i<len(s):
    if s[i]==' ':
        if j!=-1:
            ans.append(s[j:i])
        j=-1
    elif s[i]=="\"":
        j=i+1
        i+=1
        while s[i]!="\"":
            i+=1
        ans.append(s[j:i])
        j=-1
    else:
        if j==-1:
            j=i
    i+=1
for i in ans:
    print('<'+i+'>')


l=input().strip()
r=[]
u=l.split('"')
if l[-1]=='"':
    u.pop()

v=len(u)

for i in range(v):
    if i%2:
        r.append(u[i])
    else:
        x=u[i].split()
        for j in x:
            r.append(j)

for u in r:
    print('<',u,'>',sep='')


s = input().split('"')
for i in range(len(s)):
	if i % 2:
		print('<', s[i], '>', sep='')
	else:
		l = [x for x in s[i].split() if x != '']
		if l != []:
			print('<', '>\n<'.join(l), '>', sep='')

# from dust i have come dust i will be

import shlex

s=input();
a=shlex.split(s)

for x in a:
    print('<'+x+'>')


s = input().split('"')
for i in range(len(s)):
	if i % 2:
		print('<', s[i], '>', sep='')
	else:
		l = [x for x in s[i].split() if x != '']
		if l != []:
			print('<', '>\n<'.join(l), '>', sep='')




# Made By Mostafa_Khaled

import shlex
s=input();
a=shlex.split(s)
for x in a:
    print('<'+x+'>')

args = input()
def interpreter(arg):
    args = arg.split(' ')
    output = list()
    i = 0
    while i < len(args):
        if args[i] == '':
            pass
        elif args[i][0] == '"':
            if len(args[i]) > 1 and args[i][1] == '"':
                output.append('<>')
            elif len(args[i]) > 1 and args[i][-1] == '"':
                output.append('<' + args[i][1:-1] + '>')
            else:
                if len(args[i]) > 1:
                    output.append('<' + args[i][1:])
                else:
                    output.append('<')
                i += 1
                while len(args[i]) == 0 or args[i][-1] != '"':
                    if args[i] == '':
                        output[-1] = output[-1] + ' '
                    else:
                        output[-1] = output[-1] + ' ' + args[i]
                    i += 1
                if len(args[i]) > 1:
                    output[-1] = output[-1] + ' ' + args[i][:-1] + '>'
                else:
                    output[-1] = output[-1] + ' >'
        else:
            output.append('<' + args[i] + '>')
        i += 1
    return output

for i in interpreter(args):
    print(i)


args = input()


def interpreter(arg):
    args = arg.split(' ')
    output = list()
    i = 0
    while i < len(args):
        if args[i] == '':
            pass
        elif args[i][0] == '"':
            if len(args[i]) > 1 and args[i][1] == '"':
                output.append('<>')
            elif len(args[i]) > 1 and args[i][-1] == '"':
                output.append('<' + args[i][1:-1] + '>')
            else:
                if len(args[i]) > 1:
                    output.append('<' + args[i][1:])
                else:
                    output.append('<')
                i += 1
                while len(args[i]) == 0 or args[i][-1] != '"':
                    if args[i] == '':
                        output[-1] = output[-1] + ' '
                    else:
                        output[-1] = output[-1] + ' ' + args[i]
                    i += 1
                if len(args[i]) > 1:
                    output[-1] = output[-1] + ' ' + args[i][:-1] + '>'
                else:
                    output[-1] = output[-1] + ' >'
        else:
            output.append('<' + args[i] + '>')
        i += 1
    return output


for i in interpreter(args):
    print(i)


a = input()
ans=[]
t=''
qoute =0
space =0
start =1 if a[0]=='"' else 0
for i in range(len(a)):
    v= a[i]
    if start:
        if t=='':
            if v=='"':
                qoute+=1
                t = '<'
            elif v==' ':
                pass
            else:
                space+=1
                t='<'+v
        elif qoute>0:
            if v =='"':
                t+='>'
                qoute=0
                ans.append(t)
                t=''
                start=0
            else:
                t+=v
        else:
            if v ==' ':
                if t!='<':
                    t+='>'
                    ans.append(t)
                    t=''
                    start=0
            else:
                t+=v
    else:
        if v==' ':
            start=1
        elif v=='"':
            start=1
            t='<'
            qoute=1
        else:
            t='<'+v
            start=1
if t!='':
    t+='>'
    ans.append(t)
for v in ans:
    print(v)

class CodeforcesTask291BSolution:
    def __init__(self):
        self.result = ''
        self.command = ''

    def read_input(self):
        self.command = input()

    def process_task(self):
        lexems = []
        cmd = []
        started = False
        for x in range(len(self.command)):
            if started:
                if self.command[x] == '"':
                    started = False
                    lexems.append(cmd)
                    cmd = []
                else:
                    cmd.append(self.command[x])
            else:
                if self.command[x] == " ":
                    if cmd:
                        lexems.append(cmd)
                        cmd = []
                elif self.command[x] == '"':
                    started = True
                else:
                    cmd.append(self.command[x])
        if cmd:
            lexems.append(cmd)
        if lexems:
            lexems[0] = ["<"] + lexems[0]
            lexems[-1].append(">")
        self.result = ">\n<".join(["".join(x) for x in lexems])

    def get_result(self):
        return self.result


def __starting_point():
    Solution = CodeforcesTask291BSolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())

__starting_point()

list1=list()
cmd=input()
i=0
n=len(cmd)
while(i<len(cmd) and i!=-1):
    x=cmd[i]
    if x=='"':
        ind=cmd.find('"',i+1,n)
        if ind==-1:
            break
        if ind+1< len(cmd) and cmd[ind+1]==' ':
               list1.append(cmd[i+1:ind]);
        else:
            ind=cmd.find('"',ind+1,n)
            list1.append(cmd[i+1:ind])
        i=ind+1
        if ind==-1:
            break
    elif x !=' ':
        j=i
        while(i<n and cmd[i]!=' '):
            i+=1
        x=cmd[j:i]
        list1.append(x)
        i+=1
    else:
        i+=1

for x in list1:
    print("<",x,">",sep="")


n=input()
z,i=len(n),0
while i<z:
    if n[i]=='"':
        k="<";i+=1
        while i<z and n[i]!='"':k+=n[i];i+=1
        k+='>';i+=1
        print(k)
    elif n[i]!=" ":
        k="<"
        while i<z and n[i]!=" ":k+=n[i];i+=1
        k+=">"
        print(k)
    else:i+=1