/*
Silly Mistakes
1. Wrong array size(100 instead of 101)
2. Wrong variable used due to typing mistake(j instead of i)
3. i/25 is not equal to i/25.0
4. Using variables which have garbage values
5. Not using constants like l for double and LL for long long
Silly Hacks
1. Applying hack when some unknown function is used
2. Wrong analysis of complexity and doing hack thinking it will give TLE
Before Contest
1. One hour rest
2. Poop!
3. Files ready in CB
4. Full Stomach
During contest
1. First solve all problems, then lock and hack.
2. Avoid wrong hacks
After contest
1. Upsolve
*/
#include<bits/stdc++.h>
using namespace std;
#define sc scanf
#define pr printf
#define wh while
#define ll long long
#define ull unsigned long long
#define lld I64d
#define mp make_pair
#define ff first
#define ss second
#define vc vector
#define pb push_back
#define st string
#define bl bool
#define tr true
#define fl false
#define read freopen("in.txt","r",stdin)
#define write freopen("out.txt","w",stdout)
#define fast ios_base::sync_with_stdio(false)
#include<bits/stdc++.h>
using namespace std;
int n;
vector < string> z;
size_t found;
void solve( int start,string b)
{
string c= b;
if ( start== n) z.pb ( b) ;
else
{
c= b+ "A" ;
solve( start+ 1 ,c) ;
c= b+ "C" ;
solve( start+ 1 ,c) ;
c= b+ "G" ;
solve( start+ 1 ,c) ;
c= b+ "T" ;
solve( start+ 1 ,c) ;
}
}
class TopBiologist
{
public :
string findShortestNewSequence( string sequence)
{
for ( n= 1 ; n<= 6 ; n++ ) solve( 0 ,"" ) ;
int l= z.size ( ) ;
for ( int i= 0 ; i< l; i++ )
{
found= sequence.find ( z[ i] ) ;
if ( found== string:: npos ) return z[ i] ;
}
}
} ;
LyoKU2lsbHkgTWlzdGFrZXMKMS4gV3JvbmcgYXJyYXkgc2l6ZSgxMDAgaW5zdGVhZCBvZiAxMDEpCjIuIFdyb25nIHZhcmlhYmxlIHVzZWQgZHVlIHRvIHR5cGluZyBtaXN0YWtlKGogaW5zdGVhZCBvZiBpKQozLiBpLzI1IGlzIG5vdCBlcXVhbCB0byBpLzI1LjAKNC4gVXNpbmcgdmFyaWFibGVzIHdoaWNoIGhhdmUgZ2FyYmFnZSB2Y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