DNA replication Y77867


Statement
 

pdf   zip

Write a program that reads several DNA strands, and writes the complementay strand for each of them. Remember that Adenine (A) pairs with Thymine (T) and Guanine (G) with Cytosine (C).

Input

The input is a sequence of strings. All strings are formed exclusively by characters A,T,G,C.

Output

For each string in the input, print the complementary DNA strand.

Public test cases
  • Input

    GATTAGACAA
    ATACA  ACATA  CAGATA GATAGAT
    CCCGGGAAATA
    GCATCATCATCAGTCAGCTATCTATTCTGCATAGTCAGTCA
    CAC
    

    Output

    CTAATCTGTT
    TATGT
    TGTAT
    GTCTAT
    CTATCTA
    GGGCCCTTTAT
    CGTAGTAGTAGTCAGTCGATAGATAAGACGTATCAGTCAGT
    GTG
    
  • Information
    Author
    Lluís Padró
    Language
    English
    Official solutions
    Python
    User solutions
    Python