#!/usr/bin/python

import re
import sys

for line in open('rt.fa'):
    line = line.rstrip()
    match = re.search('>.*clone (\S+) ', line)
    if match:
        sys.stdout.write('>')
        print match.group(1)
    else:
        print line