while 1: r='' for s in input().split()[::-2]:r='<%s>'%s+r+''%s print(r)