fork download
  1. # your code goes here
  2. x = raw_input()
  3. res = []
  4. for i in range(0, len(x), 3):
  5. res.append(x[i:i+3])
  6.  
  7. uni = set(res)
  8. alpha = 'abcdefghijklmnopqrstuvwxyz'
  9. both = dict(zip(uni, alpha[:len(uni)]))
  10.  
  11. rs = [both[i] for i in res]
  12. print ''.join(rs)
Success #stdin #stdout 0.02s 7028KB
stdin
TACTGTGTGCTCATTCGGTTATCGACCCTTTCCACTTAATCAATCCCCTCTCTTCTCTTGACT
stdout
gdeljhnmabpikrcqfbloi