#include<cmath>
#include<cstdio>
#include<vector>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define LOWbit(x) (x&(-x))
#define INF 21000000
#define MAXN 21000
#define mod 9901
#define CH 26
int ans;
int root;
struct Tree{
    vector<int>g,key,chd;
    int value;
    int dp;
    int sec;
    int in;
    void init(){
        dp=0;
        sec=0;
        in=0;
        g.clear();
        key.clear();
        chd.clear();
    }
}tree[MAXN];
void Init(int n){
    for(int i=0;i<=n;i++)
    tree[i].init();
}
void DFS(int u,int fa){
    int temp=-1;
    int sec=-1;
    int size=tree[u].g.size();
    if(size==1&&u!=root){
        tree[u].dp=0;
        tree[u].sec=-1;
        return;
    }
    for(int i=0;i<size;i++){
        int v=tree[u].g[i];
        if(v==fa) continue;
        DFS(v,u);
        if(tree[v].dp+tree[u].key[i]<=temp&&tree[v].dp+tree[u].key[i]>sec)
        sec=tree[v].dp+tree[u].key[i];
        if(tree[v].dp+tree[u].key[i]>temp){
            sec=temp;
            temp=tree[v].dp+tree[u].key[i];
        }
    }
    tree[u].dp=temp;
    tree[u].sec=sec;
    if(u==root&&tree[root].in==1){
        ans=max(ans,tree[u].dp);
    }
    else if(tree[u].sec!=-1&&tree[u].dp+tree[u].sec>ans)
    ans=tree[u].dp+tree[u].sec;
}

inline void scan_f(int &num)
{
    char in;
    int flag=0;
    in=getchar();
    while(in<'0'||in>'9'){
        if(in=='-')flag=1;
        in=getchar();
    }
    num=in-'0';
    while(in=getchar(),in>='0'&&in<='9')
    {
        num*=10,num+=in-'0';
    }
    if(flag)num=-num;
}

int main()
{
    int i,j,h;
    int T,n,m;
    int cas=1;
    int a,b,c;
      freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    while(~scanf("%d",&m)){
        int total=0;
        while(m--){
            scan_f(n);
            Init(n);
            for(i=2;i<=n;i++){
                scan_f(a);scan_f(b);c=1;
                tree[a].g.push_back(b);
                tree[a].key.push_back(c);
                tree[b].g.push_back(a);
                tree[b].key.push_back(c);
                tree[a].in++;
                tree[b].in++;
            }
            root=1;
            ans=-1;
            DFS(root,0);
//          printf("%d..\n",ans);
//          for(i=1;i<=n;i++){
//              printf("%d: %d %d \n",i,tree[i].dp,tree[i].sec);
//          }
            total+=ans;
        }
        printf("%d\n",total);
    }
    return 0;
}
/*
2
3 1 2 1 3
4 1 2 2 3 2 4
2
5 1 2 2 3 3 4 3 5
7 3 4 1 2 2 4 4 6 2 7 6 5
*/


#include <cmath>
#include <queue>
#include <cstdio>
#include <vector>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <map>

using namespace std;

#define lowbit(x) (x&(-x))
#define Max(a,b) a>b?a:b;
#define LL long long
#define maxn 1000000
#define mod1 112233
#define CC(m,what) memset(m,what,sizeof(m))
#define L(i) (1<<i)
#define R(i) (1>>i)
#define check(a,i) ((a & L(i-1))
#define inf 0x7fffffff
#define eps 1e-7
#define FF(i,n) for (i = 0 ; i < n ; i ++)

vector<int>p[200];
int maxcnt[200];
bool hash[200];
int maxi;
int sum;

int dfs(int father,int child)
{
    int i,j,k,l,w;
    for(i=0;i<p[child].size();i++)
    {
        j=p[child][i];
       // hash[j]=true;
        if(j==father)continue;
        if(maxcnt[j]==0)
        w=dfs(child,j);
        else
        w=maxcnt[j];
        maxcnt[child]=max(maxcnt[child],w+1);
    }
   // cout<<"max="<<maxcnt[child]<<"child="<<child<<endl;
    return maxcnt[child];
}
int main()
{
    int i,j,k,l;
    int n;
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    scanf("%d",&n);
    sum=0;
    while(n--)
    {
        maxi=0;
        scanf("%d",&k);
        for(i=0;i<=k;i++)
            p[i].clear();
        CC(maxcnt,0);
        CC(hash,false);
        for(i=0;i<k-1;i++)
        {
            scanf("%d%d",&j,&l);
            p[j].push_back(l);
            p[l].push_back(j);
        }
        for(i=1;i<=k;i++)
        {
            if(!hash[i]&&!maxcnt[i])
            {
                hash[i]=true;
                maxi=max(maxi,dfs(i,i));
            }
        }
        sum+=maxi;

    }
    cout<<sum<<endl;
}


#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
#define N 200
#define M 200

typedef struct node1
{
    int v;
    int len;
    node1 *nex;
}NODE1;

typedef struct node2
{
    int v;
    node2 *nex;
}NODE2;

NODE1 edg1[N*2],*link1[N];
NODE2 edg2[M*2],*link2[N];
int tree[N],hh[N],in[N];
int cnt1,cnt2;
int _max;
int dis[N];
int n,m,t;
void init()
{
    memset(link1,0,sizeof(link1));
    memset(link2,0,sizeof(link2));
    memset(tree,-1,sizeof(tree));
    memset(hh,0,sizeof(hh));
    memset(in,0,sizeof(in));
    cnt1=cnt2=0;
}
int find(int x)
{
    if(tree[x]==x)
        return x;
    return tree[x]=find(tree[x]);
}
void scanf_(int &num)
{
    char in;
    while((in=getchar()) > '9' || in<'0') ;
    num=in-'0';
    while(in=getchar(),in>='0'&&in<='9')
        num*=10,num+=in-'0';
}
void insert(int a,int b,int c)
{
    edg1[cnt1].v=b;
    edg1[cnt1].len=c;
    edg1[cnt1].nex=link1[a];
    link1[a]=&edg1[cnt1++];

    edg1[cnt1].v=a;
    edg1[cnt1].len=c;
    edg1[cnt1].nex=link1[b];
    link1[b]=&edg1[cnt1++];
}
void insert(int a,int b)
{
    edg2[cnt2].v=b;
    edg2[cnt2].nex=link2[a];
    link2[a]=&edg2[cnt2++];

    edg2[cnt2].v=a;
    edg2[cnt2].nex=link2[b];
    link2[b]=&edg2[cnt2++];
}
void solve(int n)
{
    int i;
    int temp;
    tree[n]=n;
    for(NODE1 *p=link1[n];p;p=p->nex)
    {
        temp=p->v;
        if(hh[temp]==0)
        {
            if(tree[temp]!=-1)
                continue;
             dis[temp]=dis[n]+p->len;
               solve(temp);
            tree[temp]=n;
        }
    }
    hh[n]=1;
    for(NODE2 *p=link2[n];p;p=p->nex)
    {
        temp=p->v;
        if(hh[temp])
            _max=max(_max,dis[n]+dis[temp]-2*dis[find(temp)]);
    }
}

int main()
{
    int i,j;
    int a,b;
    int ans;
    freopen("input.txt","r",stdin);
   freopen("output.txt","w",stdout);
    while(~scanf("%d",&t))
    {
        ans=0;
        while(t--)
        {
            scanf("%d",&n);
            init();
            for(i=1;i<n;i++)
            {
                scanf("%d%d",&a,&b);
                in[a]++;in[b]++;
                insert(a,b,1);
            }
            for(i=1;i<=n;i++)
                if(in[i]==1)
                    for(j=1;j<=n;j++)
                        if(in[j]==1 && i!=j)
                            insert(i,j);
            _max=1;
            for(i=1;i<=n;i++)
                if(in[i]!=1)
                {
                    solve(i);
                    break;
                }
            ans+=_max;
        }
        printf("%d\n",ans);
    }

}


           #include <cstdio>
    #include <cstring>
    #include <iostream>
    using namespace std;

    #define read(n) scanf("%d", &n)
    #define forab(i, a, b)  for(int i = a; i<=b; i++)
    #define forn(i,n)   forab(i, 0, n-1)

    int ans;
    bool G[110][110];
    int mx, idx;
    int n, m;

    void dfs(int u, int dist, int p) {
    //  cout << "dfs " << p << " " << u << endl;
        if(dist > mx) {
            mx = dist;
            idx = u;
        }
        forab(v, 1, m)  if(p != v && G[u][v])
            dfs(v, dist+1, u);
    }

    int main() {
        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdin);

        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);

        read(n);
    //  cout << "hi\n";

        while(n--) {
            read(m);
            memset(G, 0, sizeof(G));

            forn(i, m-1) {
                int x, y;
                read(x);    read(y);
                G[x][y] = G[y][x] = true;
            }
            mx = idx = -1;

    //      cout << "#1\n";

            dfs(1, 0, -1);
            mx = 0;
    //      cout << "#2\n";
            dfs(idx, 0, -1);
    //      cout << "#3\n";
            ans+=mx;
        }

        cout << ans;

        return 0;
    }


#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;

#define read(n) scanf("%d", &n)
#define forab(i, a, b)  for(int i = a; i<=b; i++)
#define forn(i,n)   forab(i, 0, n-1)

int ans;
bool G[110][110];
int mx, idx;
int n, m;

void dfs(int u, int dist, int p) {
//  cout << "dfs " << p << " " << u << endl;
    if(dist > mx) {
        mx = dist;
        idx = u;
    }
    forab(v, 1, m)  if(p != v && G[u][v])
        dfs(v, dist+1, u);
}

int main() {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdin);

    read(n);
//  cout << "hi\n";

    while(n--) {
        read(m);
        memset(G, 0, sizeof(G));

        forn(i, m-1) {
            int x, y;
            read(x);    read(y);
            G[x][y] = G[y][x] = true;
        }
        mx = idx = -1;

//      cout << "#1\n";

        dfs(1, 0, -1);
        mx = 0;
//      cout << "#2\n";
        dfs(idx, 0, -1);
//      cout << "#3\n";
        ans+=mx;
    }

    cout << ans;

    return 0;
}


    #include <cstdio>
    #include <cstring>
    #include <iostream>
    using namespace std;

    #define read(n) scanf("%d", &n)
    #define forab(i, a, b)  for(int i = a; i<=b; i++)
    #define forn(i,n)   forab(i, 0, n-1)

    int ans;
    bool G[110][110];
    int mx, idx;
    int n, m;

    void dfs(int u, int dist, int p) {
    //  cout << "dfs " << p << " " << u << endl;
        if(dist > mx) {
            mx = dist;
            idx = u;
        }
        forab(v, 1, m)  if(p != v && G[u][v])
            dfs(v, dist+1, u);
    }

    int main() {
        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);

        read(n);
    //  cout << "hi\n";

        while(n--) {
            read(m);
            memset(G, 0, sizeof(G));

            forn(i, m-1) {
                int x, y;
                read(x);    read(y);
                G[x][y] = G[y][x] = true;
            }
            mx = idx = -1;

    //      cout << "#1\n";

            dfs(1, 0, -1);
            mx = 0;
    //      cout << "#2\n";
            dfs(idx, 0, -1);
    //      cout << "#3\n";
            ans+=mx;
        }

        cout << ans;

        return 0;
    }


    #include <cstdio>
    #include <cstring>
    #include <iostream>
    using namespace std;

    #define read(n) scanf("%d", &n)
    #define forab(i, a, b)  for(int i = a; i<=b; i++)
    #define forn(i,n)   forab(i, 0, n-1)

    int ans;
    bool G[110][110];
    int mx, idx;
    int n, m;

    void dfs(int u, int dist, int p) {
    //  cout << "dfs " << p << " " << u << endl;
        if(dist > mx) {
            mx = dist;
            idx = u;
        }
        forab(v, 1, m)  if(p != v && G[u][v])
            dfs(v, dist+1, u);
    }

    int main() {
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);

        read(n);
    //  cout << "hi\n";

        while(n--) {
            read(m);
            memset(G, 0, sizeof(G));

            forn(i, m-1) {
                int x, y;
                read(x);    read(y);
                G[x][y] = G[y][x] = true;
            }
            mx = idx = -1;

    //      cout << "#1\n";

            dfs(1, 0, -1);
            mx = 0;
    //      cout << "#2\n";
            dfs(idx, 0, -1);
    //      cout << "#3\n";
            ans+=mx;
        }

        cout << ans;

        return 0;
    }


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(v!=pre&&gra[u][v])
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
       else gr[u].push_back(make_pair(v,1));
    }
   if(gr[u].size()>0)
    sort(gr[u].begin(),gr[u].end());
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
       if(siz>0&&u==gr[pre][siz-1].first)
     {
       if(siz>1&&dis[u]<gr[pre][siz-2].second+1)
       dis[u]=gr[pre][siz-2].second+1;
     }
      else if(siz>0&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
   }
    for(int v=0;v<n;v++)
      if(v!=pre&&gra[u][v])
       dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    int N,ans=0;
    scanf("%d",&N);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
        else gr[u].push_back(make_pair(v,1));
    }
   if(gr[u].size()>0)
    sort(gr[u].begin(),gr[u].end());
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
   }
   if(pre!=-1&&u==gr[pre][siz-1].first)
   {
       if(gr[pre].size()>1&&dis[u]<gr[pre][siz-2].second+1)
       dis[u]=gr[pre][siz-2].second+1;
   }
   else if(pre!=-1&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)
   gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    int N,ans=0;
    scanf("%d",&N);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
        else gr[u].push_back(make_pair(v,1));
    }
    sort(gr[u].begin(),gr[u].end());
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
   }
   if(pre!=-1&&u==gr[pre][siz-1].first)
   {
       if(gr[pre].size()>1&&dis[u]<gr[pre][siz-2].second+1)
       dis[u]=gr[pre][siz-2].second+1;
   }
   else if(pre!=-1&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)
   gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    int N,ans=0;
    scanf("%d",&N);
    for(size_t i=0;i<gr[0].size();i++)
    printf("%d %d\n",gr[0][i].first,gr[0][i].second);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
bool cmp( pair<int,int> a,pair<int,int>b)
{
    if(a.second!=b.second)return a.second<b.second;
    return a.first<b.first;
}
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(v!=pre&&gra[u][v])
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
       else gr[u].push_back(make_pair(v,1));
    }
   if(gr[u].size()>0)
    sort(gr[u].begin(),gr[u].end(),cmp);
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
        if(siz>0&&u==gr[pre][siz-1].first)
      {
         if(siz>1&&dis[u]<gr[pre][siz-2].second+1)
         dis[u]=gr[pre][siz-2].second+1;
      }
      else if(siz>0&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
   }
    for(int v=0;v<n;v++)
      if(v!=pre&&gra[u][v])
       dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    freopen("input.txt","r",stdin);
   freopen("output.txt","w",stdout);
    int N,ans=0;
    scanf("%d",&N);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(v!=pre&&gra[u][v])
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
       else gr[u].push_back(make_pair(v,1));
    }
   if(gr[u].size()>0)
    sort(gr[u].begin(),gr[u].end());
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
        if(siz>0&&u==gr[pre][siz-1].first)
      {
         if(siz>1&&dis[u]<gr[pre][siz-2].second+1)
         dis[u]=gr[pre][siz-2].second+1;
      }
      else if(siz>0&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
   }
    for(int v=0;v<n;v++)
      if(v!=pre&&gra[u][v])
       dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
    int N,ans=0;
    scanf("%d",&N);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
        else gr[u].push_back(make_pair(v,1));
    }
    sort(gr[u].begin(),gr[u].end());
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
   }
   if(pre!=-1&&u==gr[pre][siz-1].first)
   {
       if(gr[pre].size()>1&&dis[u]<gr[pre][siz-2].second+1)
       dis[u]=gr[pre][siz-2].second+1;
   }
   else if(pre!=-1&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)
   gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    int N,ans=0;
    scanf("%d",&N);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#define LMT 102
using namespace std;
bool gra[LMT][LMT];
int dis[LMT];
vector< pair<int,int> >gr[LMT];
int n;
void inidfs(int u,int pre)
{
    for(int v=0;v<n;v++)
    if(gra[u][v]&&v!=pre)
    {
        inidfs(v,u);
       if(gr[v].size()>0)
       {
           pair<int,int> p=gr[v][gr[v].size()-1];
           gr[u].push_back(make_pair(v,p.second+1));
       }
       else gr[u].push_back(make_pair(v,1));
    }
   if(gr[u].size()>0)
    sort(gr[u].begin(),gr[u].end());
}
void dfs(int u,int pre)
{
    int siz;
   if(pre!=-1)
   {
       dis[u]=dis[pre]+1;
       siz=gr[pre].size();
       if(u==gr[pre][siz-1].first)
     {
       if(gr[pre].size()>1&&dis[u]<gr[pre][siz-2].second+1)
       dis[u]=gr[pre][siz-2].second+1;
     }
      else if(pre!=-1&&dis[u]<gr[pre][siz-1].second+1)dis[u]=gr[pre][siz-1].second+1;
   }
    for(int v=0;v<n;v++)
      if(gra[u][v]&&v!=pre)
       dfs(v,u);
}
int solve(void)
{
   int ret=-1;
   for(int i=0;i<n;i++)gr[i].clear();
   memset(dis,0,sizeof(dis));
   inidfs(0,-1);
   ret=gr[0][gr[0].size()-1].second;
   dfs(0,-1);
   for(int i=0;i<n;i++)
     ret=ret>dis[i]?ret:dis[i];
   return ret;
}
int main()
{
    int N,ans=0;
    scanf("%d",&N);
    while(N--)
    {
        memset(gra,0,sizeof(gra));
        scanf("%d",&n);
        for(int i=0;i<n-1;i++)
        {
            int u,v;
            scanf("%d%d",&u,&v);
            u--;v--;
            gra[u][v]=gra[v][u]=1;
        }
        ans+=solve();
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<ctime>
#include<cfloat>
#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<set>
#include<vector>
#include<algorithm>
#include<deque>
#include<string>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<time.h>
#include<bitset>
#include<list>
#include<utility>
#include<bitset>
#include<sstream>
using namespace std;
int t,n,m,k,x,y,p[110],q[110],fi,fr,r;
vector<int> g[110];
void bfs(int s)
{
    memset(p,255,sizeof(p));
    p[s]=0;
    q[0]=s;
    fi=0;
    fr=1;
    while (fi<fr)
    {
        int i=q[fi++];
        for (int j=0;j<g[i].size();j++)
        {
            k=g[i][j];
            if (p[k]==-1)
            {
                p[k]=p[i]+1;
                q[fr++]=k;
            }
        }
    }
}
int main()
{
    cin>>t;
    while (t--)
    {
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            g[i].clear();
        }
        for (int i=1;i<n;i++)
        {
            cin>>x>>y;
            g[x].push_back(y);
            g[y].push_back(x);
        }
        bfs(1);
        bfs(q[fr-1]);
        r=r+p[q[fr-1]];
    }
    cout<<r;
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<ctime>
#include<cfloat>
#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<set>
#include<vector>
#include<algorithm>
#include<deque>
#include<string>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<time.h>
#include<bitset>
#include<list>
#include<utility>
#include<bitset>
#include<sstream>
using namespace std;
int t,n,m,k,x,y,p[110],q[110],fl,fr,r;
vector<int> g[110];
void bfs(int s)
{
    memset(p,255,sizeof(p));
    p[s]=0;
    q[0]=s;
    fl=0;
    fr=1;
    while (fl<fr)
    {
        int i=q[fl++];
        for (int j=0;j<g[i].size();j++)
        {
            k=g[i][j];
            if (p[k]==-1)
            {
                p[k]=p[i]+1;
                q[fr++]=k;
            }
        }
    }
}
int main()
{
    cin>>t;
    while (t--)
    {
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            g[i].clear();
        }
        for (int i=1;i<n;i++)
        {
            cin>>x>>y;
            g[x].push_back(y);
            g[y].push_back(x);
        }
        bfs(1);
        bfs(q[fr-1]);
        r=r+p[q[fr-1]];
    }
    cout<<r;
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<ctime>
#include<cfloat>
#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<set>
#include<vector>
#include<algorithm>
#include<deque>
#include<string>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<time.h>
#include<bitset>
#include<list>
#include<utility>
#include<bitset>
#include<sstream>
using namespace std;
int t,n,m,k,x,y,p[110],q[110],fi,fr,r;
vector<int> g[110];
void bfs(int s)
{
    memset(p,255,sizeof(p));
    p[s]=0;
    q[0]=s;
    fi=0;
    fr=1;
    while (fi<fr)
    {
        int i=q[fi++];
        for (int j=0;j<g[i].size();j++)
        {
            k=g[i][j];
            if (p[k]==-1)
            {
                p[k]=p[i]+1;
                q[fr++]=k;
            }
        }
    }
    return;
}
int main()
{
    cin>>t;
    while (t--)
    {
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            g[i].clear();
        }
        for (int i=1;i<n;i++)
        {
            cin>>x>>y;
            g[x].push_back(y);
            g[y].push_back(x);
        }
        bfs(1);
        bfs(q[fr-1]);
        r=r+p[q[fr-1]];
    }
    cout<<r;
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<ctime>
#include<cfloat>
#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<set>
#include<vector>
#include<algorithm>
#include<deque>
#include<string>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<time.h>
#include<bitset>
#include<list>
#include<utility>
#include<bitset>
#include<sstream>
using namespace std;
int t,n,m,k,x,y,p[110],q[110],fl,fr,r;
vector<int> g[110];
void bfs(int s)
{
    memset(p,255,sizeof(p));
    p[s]=0;
    q[0]=s;
    fl=0;
    fr=1;
    while (fl<fr)
    {
        fl++;
        int i=q[fl];
        for (int j=0;j<g[i].size();j++)
        {
            k=g[i][j];
            if (p[k]==-1)
            {
                p[k]=p[i]+1;
                fr++;
                q[fr]=k;
            }
        }
    }
}
int main()
{
    cin>>t;
    while (t--)
    {
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            g[i].clear();
        }
        for (int i=1;i<n;i++)
        {
            cin>>x>>y;
            g[x].push_back(y);
            g[y].push_back(x);
        }
        bfs(1);
        bfs(q[fr-1]);
        r+=p[q[fr-1]];
    }
    cout<<r;
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<ctime>
#include<cfloat>
#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<set>
#include<vector>
#include<algorithm>
#include<deque>
#include<string>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<time.h>
#include<bitset>
#include<list>
#include<utility>
#include<bitset>
#include<sstream>
using namespace std;
int t,n,m,k,x,y,p[110],q[110],fl,fr,r;
vector<int> g[110];
void bfs(int s)
{
    memset(p,255,sizeof(p));
    p[s]=0;
    q[0]=s;
    fl=0;
    fr=1;
    while (fl<fr)
    {
        int i=q[fl++];
        for (int j=0;j<g[i].size();j++)
        {
            k=g[i][j];
            if (p[k]==-1)
            {
                p[k]=p[i]+1;
                q[fr++]=k;
            }
        }
    }
}
int main()
{
    cin>>t;
    while (t--)
    {
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            g[i].clear();
        }
        for (int i=1;i<n;i++)
        {
            cin>>x>>y;
            g[x].push_back(y);
            g[y].push_back(x);
        }
        bfs(1);
        bfs(q[fr-1]);
        r+=p[q[fr-1]];
    }
    cout<<r;
    return 0;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<ctime>
#include<cfloat>
#include<cstdio>
#include<stdio.h>
#include<string.h>
#include<set>
#include<vector>
#include<algorithm>
#include<deque>
#include<string>
#include<stack>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<map>
#include<time.h>
#include<bitset>
#include<list>
#include<utility>
#include<bitset>
#include<sstream>
using namespace std;
int t,n,m,k,x,y,p[110],q[110],fi,fr,r;
vector<int> g[110];
void bfs(int s)
{
    memset(p,255,sizeof(p));
    p[s]=0;
    q[0]=s;
    fi=0;
    fr=1;
    while (fi<fr)
    {
        int i=q[fi++];
        for (int j=0;j<g[i].size();j++)
        {
            k=g[i][j];
            if (p[k]==-1)
            {
                p[k]=p[i]+1;
                q[fr++]=k;
            }
        }
    }
    return;
}
int main()
{
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    cin>>t;
    while (t--)
    {
        cin>>n;
        for (int i=1;i<=n;i++)
        {
            g[i].clear();
        }
        for (int i=1;i<n;i++)
        {
            cin>>x>>y;
            g[x].push_back(y);
            g[y].push_back(x);
        }
        bfs(1);
        bfs(q[fr-1]);
        r=r+p[q[fr-1]];
    }
    cout<<r;
    return 0;
}


#include <iostream>

int N;
int m[101][101];
int dp[100];
int used[101];
int dfs(int v)
{
    used[v]=1;
    int count = 0;
    int vertex;
    int curent =0;
    for(int i= 0;i<N;++i)
    {
        if(m[v][i]==1 && used[i] != 1)
            {
               // std::cout<<i<<std::endl;
               // std::cout<<v<<std::endl;

                vertex = i;
                count = dfs(vertex);
                count++;
                if(curent<count)
                    curent = count;
            }
        else
            continue;
    }
    return curent;
}
void addToGraph(int i, int j)
{
    m[i][j] = 1;
    m[j][i] = 1;
}
int main()
{
    int K;
    int sum=0;
    std::cin>>K;
    for(int k = 0; k<K;k++)
    {
        std::cin>> N;
        for(int i = 0;i<N+1;++i)
        {
            dp[i]=-1;
        }
        int i1,j1;
        for(int i = 0;i<N-1;++i)
        {
            std::cin>>i1;
            std::cin>>j1;
            addToGraph(i1,j1);
        }

        int count=0;
        int curent=0;
        for(int i=1;i<N+1;++i)
        {
            for(int j=0;j<N+1;++j)
                used[j] = 0;
            count = dfs(i);
            if(count>curent)
                curent = count;
        }
        for(int i = 1; i<N+1;++i)
            for(int j = 1; j<N+1;++j)
                m[i][j]=0;
        sum = sum+curent;
    }

    std::cout <<sum<<std::endl;
    return 0;
}


#include <iostream>
#include <fstream>
int N;
int m[101][101];
int dp[100];
int used[101];
int dfs(int v)
{
    used[v]=1;
    int count = 0;
    int vertex;
    int curent =0;
    for(int i= 0;i<N;++i)
    {
        if(m[v][i]==1 && used[i] != 1)
            {
               // std::cout<<i<<std::endl;
               // std::cout<<v<<std::endl;

                vertex = i;
                count = dfs(vertex);
                count++;
                if(curent<count)
                    curent = count;
            }
        else
            continue;
    }
    return curent;
}
void addToGraph(int i, int j)
{
    m[i][j] = 1;
    m[j][i] = 1;
}
int main()
{
    std::ifstream in("input.txt");
    int K;
    int sum=0;
    in>>K;
    for(int k = 0; k<K;k++)
    {
        in>> N;
        for(int i = 0;i<N+1;++i)
        {
            dp[i]=-1;
        }
        int i1,j1;
        for(int i = 0;i<N-1;++i)
        {
            in>>i1;
            in>>j1;
            addToGraph(i1,j1);
        }

        int count=0;
        int curent=0;
        for(int i=1;i<N+1;++i)
        {
            for(int j=0;j<N+1;++j)
                used[j] = 0;
            count = dfs(i);
            if(count>curent)
                curent = count;
        }
        for(int i = 1; i<N+1;++i)
            for(int j = 1; j<N+1;++j)
                m[i][j]=0;
        sum = sum+curent;
    }
    in.close();
    std::ofstream out("output.txt");
    out <<sum;
    out.close();
   // std::cout <<sum<<std::endl;
    return 0;
}


#include <iostream>
#include <fstream>
int N;
int m[101][101];
int dp[100];
int used[101];
int dfs(int v)
{
    used[v]=1;
    int count = 0;
    int vertex;
    int curent =0;
    for(int i= 0;i<N+1;++i)
    {
        if(m[v][i]==1 && used[i] != 1)
            {
               // std::cout<<i<<std::endl;
               // std::cout<<v<<std::endl;

                vertex = i;
                count = dfs(vertex);
                count++;
                if(curent<count)
                    curent = count;
            }
        else
            continue;
    }
   // std::cout<<"curent"<<curent<<std::endl;
    return curent;
}
void addToGraph(int i, int j)
{
    m[i][j] = 1;
    m[j][i] = 1;
}
int main()
{
    std::ifstream in("input.txt");
    int K;
    int sum=0;
    in>>K;
    for(int k = 0; k<K;k++)
    {
        in>> N;
        for(int i = 0;i<N+1;++i)
        {
            dp[i]=-1;
        }
        int i1,j1;
        for(int i = 0;i<N;++i)
        {
            in>>i1;
            in>>j1;
            addToGraph(i1,j1);
        }

        int count=0;
        int curent=0;
        for(int i=1;i<N+1;++i)
        {
            for(int j=0;j<N+1;++j)
                used[j] = 0;
            count = dfs(i);
            if(count>curent)
                curent = count;
        }
        for(int i = 1; i<N+1;++i)
            for(int j = 1; j<N+1;++j)
                m[i][j]=0;
        sum = sum+curent;
    }
    in.close();
    std::ofstream out("output.txt");
    out <<sum;
    out.close();
    //std::cout <<sum<<std::endl;
    return 0;
}


#include <iostream>
#include <fstream>
int N;
int m[101][101];
int dp[100];
int used[101];
int dfs(int v)
{
    used[v]=1;
    int count = 0;
    int vertex;
    int curent =0;
    for(int i= 0;i<N;++i)
    {
        if(m[v][i]==1 && used[i] != 1)
            {
               // std::cout<<i<<std::endl;
               // std::cout<<v<<std::endl;

                vertex = i;
                count = dfs(vertex);
                count++;
                if(curent<count)
                    curent = count;
            }
        else
            continue;
    }
    return curent;
}
void addToGraph(int i, int j)
{
    m[i][j] = 1;
    m[j][i] = 1;
}
int main()
{
    std::ifstream in("input.txt");
    int K;
    int sum=0;
    in>>K;
    for(int k = 0; k<K;k++)
    {
        in>> N;
        for(int i = 0;i<N+1;++i)
        {
            dp[i]=-1;
        }
        int i1,j1;
        for(int i = 0;i<N-1;++i)
        {
            in>>i1;
            in>>j1;
            addToGraph(i1,j1);
        }

        int count=0;
        int curent=0;
        for(int i=1;i<N+1;++i)
        {
            for(int j=0;j<N+1;++j)
                used[j] = 0;
            count = dfs(i);
            if(count>curent)
                curent = count;
        }
        for(int i = 1; i<N+1;++i)
            for(int j = 1; j<N+1;++j)
                m[i][j]=0;
        sum = sum+curent;
    }
    in.close();
    ofstream out("output.txt");
    out <<sum;
    out.close();
   // std::cout <<sum<<std::endl;
    return 0;
}


#include <iostream>
#include <fstream>
int N;
int m[101][101];
int dp[100];
int used[101];
int dfs(int v)
{
    used[v]=1;
    int count = 0;
    int vertex;
    int curent =0;
    for(int i= 0;i<N+1;++i)
    {
        if(m[v][i]==1 && used[i] != 1)
            {
                //std::cout<<i<<std::endl;
                //std::cout<<v<<std::endl;

                vertex = i;
                count = dfs(vertex);
                count++;
                if(curent<count)
                    curent = count;
            }
        else
            continue;
    }
    //std::cout<<"curent"<<curent<<std::endl;
    return curent;
}
void addToGraph(int i, int j)
{
    m[i][j] = 1;
    m[j][i] = 1;
}
int main()
{
    std::ifstream in("input.txt");
    int K;
    int sum=0;
    in>>K;
    for(int k = 0; k<K;k++)
    {
        in>> N;
        for(int i = 0;i<N+1;++i)
        {
            dp[i]=-1;
        }
        int i1,j1;
        for(int i = 0;i<N-1;++i)
        {
            in>>i1;
            in>>j1;
            addToGraph(i1,j1);
        }

        int count=0;
        int curent=0;
        for(int i=1;i<N+1;++i)
        {
            for(int j=0;j<N+1;++j)
                used[j] = 0;
            count = dfs(i);
            if(count>curent)
                curent = count;
        }
        for(int i = 1; i<N+1;++i)
            for(int j = 1; j<N+1;++j)
                m[i][j]=0;
        sum = sum+curent;
    }
    in.close();
    std::ofstream out("output.txt");
    out <<sum;
    out.close();
    //std::cout <<sum<<std::endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
     int n,k,a[10000],t=0;
     cin>>n>>k;
     for(int i=0;i<n;i++)
     {
         for(int j=0;j<k;j++)
         {
             int h;
             cin>>h;
             a[t]=h;
             t++;
         }
         sort(a,a+t);
         int d=n;
         for(int i=t-1;i>=0;i--)
         {
            if(a[i]==d)
              d--;
         }

         if(d==0)
          cout<<"I became the guy.";
          else
           cout<<"Oh, my keyboard!";
           return 0;
     }
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,d=0,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=k;i++)
	 	{
	 		int e;
	 		cin>>e;
	 		a[t]=e;
	 		t++;
		 }
		 for(int i=1;i<=k;i++)
	 	{
	 		int p;
	 		cin>>p;
	 		a[t]=p;
	 		t++;
		 }
		 sort(a,a+t);
		 for(int i=0;i<t;i++)
		 {
		 	if(g==a[i])
		 	{
		 		g++;
		 		d++;
			}
		 }
		 if(d==n)
		 	cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,d=0,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=2;i++)
	 	{
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
		}
		 sort(a,a+t);
		 for(int i=0;i<t;i++)
		 {
		 	if(g==a[i]&&a[i]!=a[i+1])
		 	{
		 		g++;
		 		d++;
			}
		 }
		 if(d==n)
		 	cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
     int n,k,a[10000],t=0;
     cin>>n>>k;
     for(int i=0,i<n;i++)
     {
         for(int j=0;j<k;j++)
         {
             int h;
             cin>>h;
             a[t]=h;
             t++;
         }
         sort(a,a+n);
         int d=n;
         for(int i=t-1;i>=0;i--)
         {
            if(a[i]==d)
              d--;
         }

         if(d==0)
          cout<<"I became the guy.";
          else
           cout<<"Oh, my keyboard!";
           return 0;
     }
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
		int q;
		ci>>q;
		for(int i=1;i<=q;i++)
	 		{
	 			int y;
	 			cin>>y;
	 			a[t]=y;
	 			t++;
		 	}
		 sort(a,a+t);
		 int d=n;
		 for(int i=t-1;i>=0;i--)
		 {
		 	if(d==a[i])
		 	{
		 		d--;
			}
		 }
		if(d==0)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;

}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,d=0,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=2;i++)
	 	{
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
		}
		 sort(a,a+t);
		 for(int i=0;i<t;i++)
		 {
		 	if(g==a[i]&&a[i]!=a[i+1])
		 	{
		 		g++;
		 		d++;
		 		if(d==n)
		 			break;
			}
		 }
		 if(d==n)
		 	cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=2;i++)
	 	{
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
		}
		 sort(a,a+t);
		 int d=n;
		 for(int i=t-1;i>=0;i--)
		 {
		 	if(a[i]==0)
		 	{
		 		cout<<"Oh, my keyboard!";
		 		return 0;
			 }
		 	if(d==a[i])
		 	{
		 		d--;
			}
		 }
		if(d==0)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;

}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
			for(int i=1;i<=k;i++)
	 		{
	 			int y;
	 			cin>>y;
	 			a[t]=y;
	 			t++;
		 	}
		 sort(a,a+t);
		 int d=n;
		 for(int i=t-1;i>=0;i--)
		 {
		 	if(d==a[i])
		 	{
		 		d--;
			}
		 }
		if(d==0)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;

}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=2;i++)
	 	{
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
		}
		 sort(a,a+t);
		 int d=n;
		 for(int i=t-1;i>=0;i--)
		 {
		 	if(d==a[i])
		 	{
		 		d--;
			}
		 }
		if(d==0)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,g=1,a[10000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 		for(int i=1;i<=k;i++)
	 		{
	 			int p;
	 			cin>>p;
	 			a[t]=p;
	 			t++;
		 	}
			for(int i=1;i<=k;i++)
	 		{
	 			int y;
	 			cin>>y;
	 			a[t]=y;
	 			t++;
		 	}
		 sort(a,a+t);
		 int d=0;
		 for(int i=0;i<t;i++)
		 {
		 	if(a[i]!=a[i+1])
		 	{
		 		d++;
			}
		 }
		if(d==n)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;

}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,d=0,g=1,a[100000],t=0;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=k;i++)
	 	{
	 		int e;
	 		cin>>e;
	 		a[t]=e;
	 		t++;
		 }
		 for(int i=1;i<=k;i++)
	 	{
	 		int p;
	 		cin>>p;
	 		a[t]=p;
	 		t++;
		 }
		 sort(a,a+t);
		 for(int i=0;i<t;i++)
		 {
		 	if(g==a[i])
		 	{
		 		g++;
		 		d++;
			}
		 }
		 if(d==n)
		 	cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	 	int n,d=0,g=1;
	 	cin>>n;
	 	int k;
	 	cin>>k;
	 	for(int i=1;i<=k;i++)
	 	{
	 		int e;
	 		cin>>e;
	 		if(e==g)
	 		{
	 			d++;
	 			g++;
			 }
		 }
		 for(int i=1;i<=k;i++)
	 	{
	 		int p;
	 		cin>>p;
	 		if(p==g)
	 		{
	 			d++;
	 			g++;
			 }
		 }
		 if(d==n)
		 {
		 	cout<<"I become the guy.";
		 }
		 else
		 {
		 	cout<<"Oh, my keyboard!";
		 }
	return 0;
}


#include <iostream>
using namespace std;
#define input cin>>
#define output cout<<
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    int result = 0;
    int t;
    cin >> t;
    int arr[t + 1] = {0};
    int x;
    while (cin >> x) {
        if (arr[x] != 1) {
            arr[x]++;
        }
    }
    for (int i = 1; i < t + 1; i++) {
        if (arr[i] == 0) {
            cout << "Oh, my keyboard!";
            return 0;
        }
    }
    output "I become the guy.";
    return 0;
}


#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    //freopen("untitled.txt","r",stdin);
    int t;
    cin >> t;
    set<int> s;
    int x;
    while (cin >> x) {
        s.insert(x);
    }
    vector<int> v(s.begin(), s.end());
    if (v[0] == 0) {
        cout << (v.size() - 1 == t?"I become the guy.":"Oh, my keyboard!");
    } else {
        cout << (v.size() == t?"I become the guy.":"Oh, my keyboard!");
    }
    return 0;
}


#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    freopen("untitled.txt","r",stdin);
    int t;
    cin >> t;
    set<int> s;
    int x;
    while (cin >> x) {
        s.insert(x);
    }
    vector<int> v(s.begin(), s.end());
    if (v[0] == 0) {
        cout << (v.size() - 1 == t?"I become the guy.":"Oh, my keyboard!");
    } else {
        cout << (v.size() == t?"I become the guy.":"Oh, my keyboard!");
    }
    return 0;
}


#include <iostream>
#include <set>
using namespace std;
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();

    int t;
    cin >> t;
    set<int> s;
    int x;
    while (cin >> x) {
        s.insert(x);
    }
    cout << (s.size() == t?"I become the guy.":"Oh, my keyboard!");
    return 0;
}


#include <iostream>
using namespace std;
#define input cin>>
#define output cout<<
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    int result = 0;
    int t;
    cin >> t;
    int arr[t + 1] = {0};
    int x;
    while (cin >> x) {
        if (arr[x] != 1) arr[x]++;
    }
    for (int i = 0; i < t + 1; i++) {
        if (arr[i] == 0) {
            cout << "Oh, my keyboard!";
            return 0;
        }
    }
    output "I become the guy.";
    return 0;
}
/*
4
3 1 2 3
2 2 3
*/


#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    //freopen("untitled.txt","r",stdin);
    int levels, can;
    set<int> s;
    cin >> levels;
    cin >> can;
    for (int i = 0; i < can; i++) {
        int l;cin >> l;
        s.insert(l);
    }
    cin >> can;
    for (int i = 0; i < can; i++) {
        int l;cin >> l;
        s.insert(l);
    }
    cout << (s.size() == levels?"I become the guy.":"Oh, my keyboard!");
}


#include <iostream>
using namespace std;
#define input cin>>
#define output cout<<
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    int result = 0;
    int t;
    cin >> t;
    int arr[t + 1] = {0};
    int x;
    while (cin >> x) {
        if (arr[x] != 1) arr[x]++;
    }
    for (int i = 1; i < t + 1; i++) {
        if (arr[i] == 0) {
            cout << "Oh, my keyboard!";
            return 0;
        }
    }
    output "I become the guy.";
    return 0;
}
/*
4
3 1 2 3
2 2 3
*/


#include <iostream>
using namespace std;
#define input cin>>
#define output cout<<
#define endl "\n";
#define fast() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main()
{
    fast();
    int result = 0;
    int t;
    cin >> t;
    int arr[t + 1] = {0};
    int x;
    while (cin >> x) {
        arr[x]++;
    }
    for (int i = 1; i <= t; i++) {
        if (arr[i] == 0) {
            cout << "Oh, my keyboard!";
            return 0;
        }
    }
    output "I become the guy.";
    return 0;
}


#include<iostream>
using namespace std;
int a[102],n,m,b;
main(){
	cin>>n>>m;
	for(int i=1;i<=2*m;i++)
	{ cin>>b;
	  if(a[b]==0)a[b]++;
	  if(a[b]==1)n--;
	}
	if(n==0) cout<<"I become the guy.";
	else cout<<"Oh, my keyboard!";
}


#include<iostream>
#include<algorithm>
using namespace std;
int n,m,a[101],t;
main(){
	cin>>n>>m;
	int t=1;
	for(int i=1;i<=2*m;i++)
	cin>>a[i];
	sort(a+1,a+2*m);
	t=1;
	for(int i=1;i<=2*m;i++)
	if(t==a[i])t++;
	if(t==n+1) cout<<"I become the guy."; else
	cout<<"Oh, my keyboard!";
}


#include<iostream>
using namespace std;
int a[100],n,m,b;
main(){
	cin>>n>>m;
	for(int i=1;i<=2*m;i++)
	{ cin>>b; if(a[b]==0)a[b]++,n--;}
	if(n==0) cout<<"I become the guy.";
	else cout<<"Oh, my keyboard!";

}


#include<iostream>
using namespace std;
int a[102],n,m,b,p;
main(){
	cin>>n>>m;
	for(int i=1;i<=2*m;i++)
	{ cin>>b;
	  if(a[b]==0)a[b]++,n--;}
	  if(n==0) cout<<"I become the guy.";
	else cout<<"Oh, my keyboard!";
}


#include<iostream>
using namespace std;
int a[100],n,m;
main(){
	cin>>n>>m;
	for(int i=1;i<=2*m;i++)
	{ cin>>b; if(a[b]==0)a[b]++,n--;}
	if(n==0) cout<<"I become the guy.";
	else cout<<"Oh, my keyboard!";

}


#include<iostream>
using namespace std;
int a[101],n,m,b;
main(){
	cin>>n>>m;
	for(int i=1;i<=2*m;i++)
	{ cin>>b; if(a[b]==0)a[b]++,n--;}
	if(n==0) cout<<"I become the guy.";
	else cout<<"Oh, my keyboard!";

}


#include<iostream>
#include<algorithm>
using namespace std;
int n,m,a[102],t;
main(){
	cin>>n>>m;
	int t=1;
	for(int i=1;i<=2*m;i++)
	cin>>a[i];
	sort(a+1,a+2*m);
	t=1;
	for(int i=1;i<=2*m;i++)
	if(t==a[i])t++;
	if(t==n+1) cout<<"I become the guy."; else
	cout<<"Oh, my keyboard!";
}


#include<iostream>
#include<algorithm>
using namespace std;
int n,m,a[102],t;
main(){
	cin>>n>>m;
	int t=1;
	for(int i=0;i<2*m;i++)
	cin>>a[i];
	sort(a,a+2*m);
	t=1;
	for(int i=0;i<2*m;i++)
	if(t==a[i])t++;
	if(t==n+1) cout<<"I become the guy."; else
	cout<<"Oh, my keyboard!";
}


#include<iostream>
using namespace std;
int n,p,q,b,a[105];
main(){
	cin>>n>>p;
	for(int i=1;i<=p;i++)
	{cin>>b; if(a[b]==0)a[b]++,n--;}
	cin>>q;
	for(int i=1;i<=q;i++)
	{cin>>b; if(a[b]==0)a[b]++,n--;}
	if(n==0)cout<<"I become the guy.";
	else cout<<"Oh, my keyboard!";
}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n];
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    for(i=0;i<n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n+1]={0};
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    flag=0;
    for(i=1;i<=n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n];
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<mj++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    for(i=0;i<n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n+1];
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    flag=0;
    for(i=1;i<=n;i++)
    {
        if(count[i]!=1||count[i]!=2)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n];
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    for(i=1;i<=n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n+1];
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    for(i=1;i<=n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n+1]={0};
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=k;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    for(i=1;i<=n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n+1]={0};
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=x;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    flag=0;
    for(i=1;i<=n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"Oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;
int main()
{
    int n,m,k,x,i,j,flag=0;
    cin>>n;
    cin>>m;
    int a[m],count[n+1]={0};
    for(i=0;i<m;i++)
    {
        cin>>x;
        a[i]=x;
    }
    cin>>k;
    int b[k];
    for(i=0;i<k;i++)
    {
        cin>>x;
        b[i]=x;
    }
    for(i=1;i<=n;i++)
    {
        for(j=0;j<m;j++)
        {
            if(a[j]==i)
            {
                count[i]++;
                break;
            }

        }
        for(j=0;j<k;j++)
        {
            if(b[j]==i)
            {
                count[i]++;
                break;
            }
        }

    }
    flag=0;
    for(i=1;i<=n;i++)
    {
        if(count[i]==0)
        {
            flag=1;
        }
    }
    if(flag==0)
    {
        cout<<"I become the guy.";
    }
    else if(flag==1)
    {
        cout<<"oh, my keyboard!";
    }

}


#include<iostream>
using namespace std;

int main()
{
    int a[100];
    int n,p,q,i,j,cn=0;
    cin>>n;

    cin>>p;
    for ( i=0; i<p; i++)
        cin>>a[i];
    cin>>q;
    for ( j=0; j<q; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<(p+q); i++)
        {
            if( j==a[i])
            {
                cn++;
                break;
            }
        }

    if ( cn==n)
        cout<<"I become the guy."<<endl;
    else
        cout<<"Oh, my keyboard!"<<endl;

}


#include<iostream>
using namespace std;

int main()
{
    int n,p,q,i,j,cn=0;
    cin>>n;

    int a[n];
   // int a[2*n]= {0};

    cin>>p;
    for ( i=0; i<p; i++)
        cin>>a[i];
    cin>>q;
    for ( j=0; j<q; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<(p+q); i++)
        {
            if( j==a[i])
            {
                cn++;
                break;
            }
        }

    if ( cn==n)
        cout<<"I become the guy."<<endl;
    else
        cout<<"Oh, my keyboard!"<<endl;

}


#include<iostream>
using namespace std;

int main()
{
    int n,p,q,i,j,cn=0;
    cin>>n;

    int a[20];
   // int a[2*n]= {0};

    cin>>p;
    for ( i=0; i<p; i++)
        cin>>a[i];
    cin>>q;
    for ( j=0; j<q; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<(p+q); i++)
        {
            if( j==a[i])
            {
                cn++;
                break;
            }
        }

    if ( cn==n)
        cout<<"I become the guy."<<endl;
    else
        cout<<"Oh, my keyboard!"<<endl;

}


#include<iostream>
using namespace std;

int main()
{
    int n,p,q,i,j,cn=0;
    cin>>n;

    int a[2*n]= {0};

    cin>>p;
    for ( i=0; i<p; i++)
        cin>>a[i];
    cin>>q;
    for ( j=0; j<q; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<(p+q); i++)
        {
            if( j==a[i])
            {
                cn++;
                break;
            }
        }

    if ( cn==n)
        cout<<"I become the guy."<<endl;
    else
        cout<<"Oh, my keyboard!"<<endl;

}


                 //Help from others submission... Greedy algorithm problem...
                 //Bismillahir Rahmanir Rahim
#include<iostream>
using namespace std;

#define max 100
#define endl "\n"

int main()
{
    int a[max];
    int n,o,p,i,j,count=0;
    cin>>n;

    cin>>o;
    for ( i=0; i<o; i++)
        cin>>a[i];
    cin>>p;
    for ( j=0; j<p; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<o+p; i++)
        {
            if( j==a[i])
            {
                count++;
                break;
            }
        }

    if ( count==n)
    {
        cout<<"I become the guy."<<endl;
    }
    else
        cout<<"Oh, my keyboard!"<<endl;

}


                 //Help from others submission... Greedy algorithm problem...
                 //Bismillahir Rahmanir Rahim
#include<iostream>
using namespace std;

#define endl "\n"
#define max 1000

int main()
{
    int a[max];
    int i,l,d,j,k,m,n,count=1;
    cin>>n;

    cin>>k;
    for(i=0; i<k; i++)
    {
        cin>>a[i];
    }
    cin>>m;

    for(i=0; i<m; i++)
    {
        cin>>a[i];
    }

    for(l=1; l<=n; l++)
    {
        for(d=0; d<=(k+m); d++)
        {
            if(l==a[d])
            {
                count++;
                break;
            }
        }
    }

    if( count==n)
    {
        cout<<"I become the guy."<<endl;
    }
    else
    {
        cout<<"Oh, my keyboard!"<<endl;
    }
}


#include<iostream>
using namespace std;

int main()
{
    int n,p,q,i,j,cn=0;
    cin>>n;

    int a[2*n]= {0};

    cin>>p;
    for ( i=0; i<p; i++)
        cin>>a[i];
    cin>>q;
    for ( j=0; j<q; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<(p+q); i++)
        {
            if( j==a[i])
            {
                cn++;
                break;
            }
        }
        cout<<"count = "<<cn<<endl;

    if ( cn==n)
        cout<<"I become the guy."<<endl;
    else
        cout<<"Oh, my keyboard!"<<endl;

}


#include<iostream>
using namespace std;

int main()
{
    int n,p,q,i,j,cn=0;
    cin>>n;

    int a[2*n];

    cin>>p;
    for ( i=0; i<p; i++)
        cin>>a[i];
    cin>>q;
    for ( j=0; j<q; j++,i++)
        cin>>a[i];

    for ( j=1; j<=n; j++)
        for ( i=0; i<(p+q); i++)
        {
            if( j==a[i])
            {
                cn++;
                break;
            }
        }

    if ( cn==n)
        cout<<"I become the guy."<<endl;
    else
        cout<<"Oh, my keyboard!"<<endl;

}


#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include<iomanip>
#include<vector>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n, a[100000], b[100000], c[100000], x, y, dem(1);
    cin >> n >> x;
    for(int i = 0; i < x; i++) cin >> a[i];
    cin >> y;
    for(int i = 0; i < y; i++) cin >> b[i];
    if(x == 0 && y == 0) cout << "Oh, my keyboard!";
    else
    {
        for(int i = 0; i < x; i++) c[i] = a[i];
        for(int i = x; i < x + y; i++) c[i] = b[i - x];
        sort(c, c + x + y);
        for(int i = 1; i < x + y; i++)
            if(c[i] != c[i - 1]) dem++;
        if(dem == n) cout << "I become the guy.";
        else cout << "Oh, my keyboard!";
    }
}


#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include<iomanip>
#include<vector>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n, a[100000], b[100000], c[100000], x, y, dem(1);
    cin >> n >> x;
    for(int i = 0; i < x; i++) cin >> a[i];
    cin >> y;
    for(int i = 0; i < y; i++) cin >> b[i];
    for(int i = 0; i < x; i++) c[i] = a[i];
    for(int i = x; i < x + y; i++) c[i] = b[i - x];
    sort(c, c + x + y);
    for(int i = 1; i < x + y; i++)
        if(c[i] != c[i - 1]) dem++;
    if(dem == n) cout << "I become the guy.";
    else cout << "Oh, my keyboard!";
}


#include<iostream>
using namespace std;

int tile() {
	int n, m;
	cin >> n >> m;
	cout << int ((n * m) / 2);
	return 0;
}


#include<iostream>
#include<set>
#include<algorithm>
using namespace std;

int main() {
	int n;
	cin >> n;
	set<int> v1;
	int p, q;
	cin >> p;
	for (int i = 0; i < p; i++) {
		int x;
		cin >> x;
		v1.insert(x);
	}
	cin >> q;
	for (int i = 0; i < q; i++) {
		int y;
		cin >> y;
		v1.insert(y);
	}
	cout << (v1.size() == n ? "I become the guy." : "Oh, my keyboard!");

}


#include <iostream>

using namespace std;

int main(){
	int a , n , m;
	cin >> a;
	cin >> n;
	int k = 0 , l = 0;
	int arr[100] , ar[100] , s[200] ;
	for (int i = 0;  i  <  n; i++) {cin >> arr[i];}
	cin >> m;
	for (int i = 0;  i  <  m; i++) {cin >> ar[i];}
	for (int i = 0;  i  <  n; i++) {s[i] = arr[i];}
	for (int i = n; i < m + n; i++) {s[i] = ar[k]; k++;}
	for (int i = 1; i <= a; i++) {
		short h = 0;
		for (int j = 0; j < n + m; j++) {
			if (i != s[j]) {h--;}
			else {l++;}
	   }
	    if (h == -4) {cout << "Oh, my keyboard!"; break ;}
	}
	if (l == m + n) {cout << "I become the guy.";}

return 0;
}


#include <iostream>

using namespace std;

int main(){
	int a , n , m;
	cin >> a;
	cin >> n;
	int k = 0 , h = 0;
	int arr[100] , ar[100] , s[200] ;
	for (int i = 0;  i  <  n; i++) {cin >> arr[i];}
	cin >> m;
	for (int i = 0;  i  <  m; i++) {cin >> ar[i];}
	for (int i = 0;  i  <  n; i++) {s[i] = arr[i];}
	for (int i = n; i < m + n; i++) {s[i] = ar[k]; k++;}
    for (int i = 1 ; i <= a; i++){
    	short l = 0;
    	for (int j = 0; j < m + n; j++ ) {
    		if (i == s[j]) {h++;}
    		else {l--;}
	    }
	    if (l == 0 - m - n) {cout << "Oh, my keyboard!" ; h-- ; break;}
	}
	if (h == m + n) {cout << "I become the guy.";}

return 0;
}


#include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int n,p,q,a[10000],x=0;
	cin>>n>>p;
	for(int i=0;i<p;i++)
		cin>>a[i];
	cin>>q;
	for(int i=p;i<p+q;i++)
		cin>>a[i];
	sort(a,a+(p+q));
	for(int i=0;i<p+q;i++)
	{
		if(a[i] !=a[i+1])
			x+=1;
	}
	if(x>=n)
		cout<<"I become the guy.";
	else
		cout<<"Oh, my keyboard!";
	return 0;
}


#include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int n,x[1000],y[1000],a=0,b=0,c=0,d=0;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>x[i];
	for(int i=0;i<n-1;i++)
		cin>>y[i];
	for(int i=0;i<n;i++)
	{
		switch (x[i])
		{
			case 1:
				a++;
				break;
			case 2:
				b++;
				break;
			case 3:
				c++;
				break;
			case 4:
				d++;
				break;
		}
	}
		for(int i=0;i<n-1;i++)
	{
		switch (y[i])
		{
			case 1:
				a++;
				break;
			case 2:
				b++;
				break;
			case 3:
				c++;
				break;
			case 4:
				d++;
				break;
		}
	}
		if(a>0 && b>0 && c>0 && d>0)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int n,x[1000],y[1000],a=0,b=0,c=0,d=0;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>x[i];
	for(int i=0;i<n-1;i++)
		cin>>y[i];
	for(int i=0;i<n;i++)
	{
		switch (x[i])
		{
			case 1:
				a++;
				break;
			case 2:
				b++;
				break;
			case 3:
				c++;
				break;
			case 4:
				d++;
				break;
		}
	}
		for(int i=0;i<=n;i++)
	{
		switch (y[i])
		{
			case 1:
				a++;
				break;
			case 2:
				b++;
				break;
			case 3:
				c++;
				break;
			case 4:
				d++;
				break;
		}
	}
		if(a>0 && b>0 && c>0 && d>0)
			cout<<"I become the guy.";
		else
			cout<<"Oh, my keyboard!";
	return 0;
}


#include <iostream>
using namespace std;

int main() {

    int a, n, x, y, ar[1000] = { 0 };
    cin >> n;
    cin >> x;
    for (int i = 0; i < x; i++) {
        cin >> a;
        ar[a] = 1;
    }
    cin >> y;
    for (int i = 0; i < y; i++) {
        cin >> a;
        ar[a] = 1;
    }
    bool OK = true;
    for (int i = 1; i <= n; i++) {
        if (ar[i] != 1) {
            OK = false;
            break;
        }
    }
    if (OK)cout << "I become the guy." << endl;
    else cout << "Oh, my keyboard!" << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int array[250];
    int n , p , q;
    cin >> n >> p;
    int count = 0;

    for(int i =  0 ; i < p ; i++){
        cin >> array[i];
    }
    cin >> q;
    for(int i = p ; i < p + q ; i++){
        cin >> array[i];
    }

    sort(array , array+(p+q));

    for(int i = 0 ; i < p+q ; i++){
        if(array[i] != array[i+1]){
            count++;
        }
    }

    if(n == (count)){
        cout << "I become the guy." <<endl;
    }else{
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    int array[250];
    int n, p, q;
    cin >> n >> p;
    int count = 0;

    for (int i = 0; i < p; i++) {
        cin >> array[i];
    }
    cin >> q;
    for (int i = p; i < p + q; i++) {
        cin >> array[i];
    }

    sort(array, array + (p + q));

    for (int i = 0; i < p + q; i++) {
        if (array[i] != array[i + 1]) {
            count++;
        }
    }

    if (n == (count)) {
        cout << "I become the guy." << endl;
    }
    else {
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}


#include <iostream>
using namespace std;

int main()
{
    int array[250];
    int n , p , q;
    cin >> n >> p;
    int count = 0;

    for(int i =  0 ; i < p ; i++){
        cin >> array[i];
    }
    cin >> q;
    for(int i = p ; i < p + q ; i++){
        cin >> array[i];
    }

    sort(array , array+(p+q));

    for(int i = 0 ; i < p+q ; i++){
        if(array[i] != array[i+1]){
            count++;
        }
    }

    if(n == (count)){
        cout << "I become the guy." <<endl;
    }else{
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}


#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <functional>
#include <bitset>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>

using namespace std;

int main() {
	int n;
	cin >> n;

	cin.ignore(1, '\n');

	unordered_set<int> distinct_levels;

	while (cin.peek() != '\n') {
		int x; cin >> x;
		distinct_levels.insert(x);
	}

	cin.ignore(1, '\n');

	while (cin.peek() != '\n') {
		int x; cin >> x;
		distinct_levels.insert(x);
	}

	if (distinct_levels.size() == n)
		cout << "I become the guy.";
	else
		cout << "Oh, my keyboard!";
}


#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <functional>
#include <bitset>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>

using namespace std;

int main() {
	int n;
	cin >> n;

	unordered_set<int> distinct_levels;

	int p; cin >> p;
	while (p--) {
		int x; cin >> x;
		distinct_levels.insert(x);
	}

	int q; cin >> q;
	while (q--) {
		int x; cin >> x;
		distinct_levels.insert(x);
	}

	if (distinct_levels.size() == n)
		cout << "I become the guy.";
	else
		cout << "Oh, my keyboard!";
}


#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <functional>
#include <bitset>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>

using namespace std;

int main() {
	int n;
	cin >> n;

	cin.ignore(1, '\n');

	unordered_set<int> distinct_levels;

	while (cin.peek() != '\n') {
		int x; cin >> x;
		if (x == 0) continue;
		distinct_levels.insert(x);
	}

	cin.ignore(1, '\n');

	while (cin.peek() != '\n') {
		int x; cin >> x;
		distinct_levels.insert(x);
	}

	if (distinct_levels.size() == n)
		cout << "I become the guy.";
	else
		cout << "Oh, my keyboard!";
}


#include <iostream>
#include <string.h>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <sstream>
#define fast ios_base::sync_with_stdio(0);	cin.tie(0);	cout.tie(0);
#define ll long long
#define fri(x,n)	for(int i = x ; i < n ; i++)
#define frj(x,n)	for(int j = x ; j < n ; j++)
#define inf 1e9
#define MAX 1000001
int dx[2] = { 0,1 };
int dy[2] = { 1,0 };
using namespace std;

int main()
{
	int n;
	cin >> n;
	int* arr = new int[n + 1];
	fri(1, n + 1)
	{
		arr[i] = 0;
	}

	int p, p1, q, q1;

	cin >> p;
	fri(0, p)
	{
		cin >> p1;
		arr[p1] = 1;
	}
	cin >> q;
	fri(0, q)
	{
		cin >> q1;
		arr[q1] = 1;
	}
	bool printt = true;
	fri(1, n + 1)
	{
		if (arr[i] == 0)
		{
			cout << "Oh, my keyboard!" << endl;
			printt = false;
		}
	}
	if (printt)
	{
		cout << "I become the guy.";
	}
	return 0;
}


/*#include <iostream>
#include<iomanip>
using namespace std;
#include<string>
#include<cmath>
#include<algorithm>
#include<vector>
#include <set>*/

#include <iostream>
#include <string.h>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <sstream>
#define fast ios_base::sync_with_stdio(0);	cin.tie(0);	cout.tie(0);
#define ll long long
#define fri(x,n)	for(int i = x ; i < n ; i++)
#define frj(x,n)	for(int j = x ; j < n ; j++)
#define inf 1e9
#define MAX 1000001
int dx[2] = { 0,1 };
int dy[2] = { 1,0 };
using namespace std;

int main()
{
	int n;
	cin >> n;
	int* arr = new int[n + 1];
	fri(1, n + 1)
	{
		arr[i] = 0;
	}

	int p, p1, q, q1;

	cin >> p;
	fri(0, p)
	{
		cin >> p1;
		arr[p1] = 1;
	}
	cin >> q;
	fri(0, q)
	{
		cin >> q1;
		arr[q1] = 1;
	}

	fri(1, n + 1)
	{
		if (arr[i] == 0)
			cout << "Oh, my keyboard!"<<endl;

	}
	cout << "I become the guy.";

	return 0;
}


/*#include <iostream>
#include<iomanip>
using namespace std;
#include<string>
#include<cmath>
#include<algorithm>
#include<vector>
#include <set>*/

#include <iostream>
#include <string.h>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <sstream>
#define fast ios_base::sync_with_stdio(0);	cin.tie(0);	cout.tie(0);
#define ll long long
#define fri(x,n)	for(int i = x ; i < n ; i++)
#define frj(x,n)	for(int j = x ; j < n ; j++)
#define inf 1e9
#define MAX 1000001
int dx[2] = { 0,1 };
int dy[2] = { 1,0 };
using namespace std;

int main()
{
	int n;
	cin >> n;
	int* arr = new int[n + 1];
	fri(1, n + 1)
	{
		arr[i] = 0;
	}

	int p, p1, q, q1;

	cin >> p;
	fri(0, p)
	{
		cin >> p1;
		arr[p1] = 1;
	}
	cin >> q;
	fri(0, q)
	{
		cin >> q1;
		arr[q1] = 1;
	}

	fri(1, n + 1)
	{
		if (arr[i] == 0)
			cout << "Oh, my keyboard!";

	}
	cout << "I become the guy.";

	return 0;
}


#include <iostream>
#include <string.h>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <sstream>
#define fast ios_base::sync_with_stdio(0);	cin.tie(0);	cout.tie(0);
#define ll long long
#define fri(x,n)	for(int i = x ; i < n ; i++)
#define frj(x,n)	for(int j = x ; j < n ; j++)
#define inf 1e9
#define MAX 1000001
int dx[2] = { 0,1 };
int dy[2] = { 1,0 };
using namespace std;

int main()
{
	int n;
	cin >> n;
	int* arr = new int[n + 1];
	fri(1, n + 1)
	{
		arr[i] = 0;
	}

	int p, p1, q, q1;

	cin >> p;
	fri(0, p)
	{
		cin >> p1;
		arr[p1] = 1;
	}
	cin >> q;
	fri(0, q)
	{
		cin >> q1;
		arr[q1] = 1;
	}

	fri(1, n + 1)
	{
		if (arr[i] == 0)
		{
			cout << "Oh, my keyboard!" << endl;
			return 0;
		}
	}

	cout << "I become the guy.";

	return 0;
}


#include <iostream>
#include<algorithm>
using namespace std;

int main()
{
    int array[250];
    int n , p , q;
    cin >> n >> p;
    int count = 0;

    for(int i =  0 ; i < p ; i++){
        cin >> array[i];
    }
    cin >> q;
    for(int i = p ; i < p + q ; i++){
        cin >> array[i];
    }

    sort(array , array+(p+q));

    for(int i = 0 ; i < p+q ; i++){
        if(array[i] != array[i+1]){
            count++;
        }
    }

    if(n == (count)){
        cout << "I become the guy." <<endl;
    }else{
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <numeric>
#include<cctype>
#include<deque>
#define endl "\n"

#define ll long long
using namespace std;

int main() {

    int n;
    cin >> n;
    set<int>levels;
    int p;
    for (int i = 0;i < 2;i++) {
        cin >> p;
        int level;
        while (p--) {
            cin >> level;
            levels.insert(level);

        }
    }
    if (levels.size() == n)cout << "I become the guy." << endl;
    else cout << "Oh, my keyboard!" << endl;

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <numeric>
#include<cctype>
#include<deque>
#define endl "\n"

#define ll long long
using namespace std;

int main() {

    int n;
    cin >> n;
    set<int>levels;
    int p;
    for (int i = 0;i < 2;i++) {
        cin >> p;
        int level;
        while (p--) {
            cin >> level;
            levels.insert(level);

        }
    }
    if (levels.size() == n)cout << "I become the guy" << endl;
    else cout << "Oh, my keyboard!" << endl;

    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,a[205],p,q,i,x=0;
    cin>>n>>p;
    for(i=0;i<p;i++)
      {
        cin>>a[i];
       }
    cin>>q;
    for(i=p;i<p+q;i++)
        {
            cin>>a[i];
        }
    sort(a,a+(p+q));
    for(i=0;i<p+q;i++)
        {
        //cout<<a[i]<<endl;
            if(a[i]!=a[i+1]){x++;}
             if(x==n){break;}
        }
        if(x==n)
            cout<<"I become the guy.";
           else
            cout<<"Oh, my keyboard!";
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,a[205],p,q,i,x=0;
    cin>>n>>p;
    for(i=0;i<p;i++)
      {
        cin>>a[i];
       }
    cin>>q;
    for(i=p;i<p+q;i++)
        {
            cin>>a[i];
        }
    sort(a,a+(p+q));
    for(i=0;i<p+q-1;i++)
        {
            if(x==n){break;}
           if(a[i]!=a[i+1]){x++;}
        }
        if(x==n)
            cout<<"I become the guy.";
        else
            cout<<"Oh, my keyboard!";
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,a[205],p,q,i,x=0;
    cin>>n>>p;
    for(i=0;i<p;i++){cin>>a[i];}
    cin>>q;
    for(i=0;i<q;i++){cin>>a[i];}
    sort(a,a+(p+q));
    for(i=0;i<p+q-1;i++)
        {
           if(a[i]!=a[i+1]){x++;}
        }
        if(x==n)
            cout<<"I become the guy.";
        else
            cout<<"Oh, my keyboard!";
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,a[205],p,q,i,x=0;
    cin>>n>>p;
    for(i=0;i<p;i++)
      {
        cin>>a[i];
       }
    cin>>q;
    for(i=0;i<q;i++)
        {
            cin>>a[i];
        }
    sort(a,a+(p+q));
    for(i=0;i<p+q;i++)
        {
            if(x==n){break;}
           if(a[i]!=a[i+1]){x++;}
        }
        if(x==n)
            cout<<"I become the guy.";
        else
            cout<<"Oh, my keyboard!";
}


#include <iostream>
using namespace std;

bool was[101];

int main()
{
    int count, size, a;
    cin >> count;
    cin >> size;
    for(int i = 0; i < size; i++)
    {
        cin >> a;
        if(was[a] == 0)
        {
            count--;
            was[a] = 1;
        }
    }
    if(count == 0)
    {
        cout << "I become the guy.";
    }
    else
    {
        cout << "Oh, my keyboard!";
    }
    return 0;
}


#include <iostream>
using namespace std;

bool was[101];

int main()
{
    int count, size, a;
    cin >> count;
    cin >> size;
    for(int i = 0; i < size * 2; i++)
    {
        cin >> a;
        if(was[a] == 0)
        {
            count--;
            was[a] = 1;
        }
    }
    if(count == 0)
    {
        cout << "I become the guy.";
    }
    else
    {
        cout << "Oh, my keyboard!";
    }
    return 0;
}


#include <iostream>
using namespace std;

bool was[101];

int main()
{
    int count, size, a;
    cin >> count;
    cin >> size;
    for(int i = 0; i < size; i++)
    {
        cin >> a;
        if(was[a] == 0)
        {
            count--;
            was[a] = 1;
        }
    }
    if(count == 0)
    {
        cout << "YES";
    }
    else
    {
        cout << "NO";
    }
    return 0;
}


#include <iostream>
using namespace std;

bool was[101];

int main()
{
    int count, size, a;
    cin >> count;
    cin >> size;
    for(int i = 0; i < size; i++)
    {
        cin >> a;
        if(was[a] == 0)
        {
            count--;
            was[a] = 1;
        }
    }
    cin >> size;
    for(int i = 0; i < size; i++)
     {
      cin >> a;
      if(was[a] == 0)
      {
       count--;
       was[a] = true;
}
}
    if(count == 0)
    {
        cout << "I become the guy.";
    }
    else
    {
        cout << "Oh, my keyboard!";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int array[250];
    int n , p , q;
    cin >> n >> p;
    int count = 0;

    for(int i =  0 ; i < p ; i++){
        cin >> array[i];
    }
    cin >> q;
    for(int i = p ; i < p + q ; i++){
        cin >> array[i];
    }

    sort(array , array+(p+q));

    for(int i = 0 ; i < p+q ; i++){
        if(array[i] != array[i+1]){
            count++;
        }
    }

    if(n == (count)){
        cout << "I become the guy." <<endl;
    }else{
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int mas[5], e = 3;
int main() {
    for (int i = 0; i < 4; i++) {
        cin >> mas[i];
    }
    sort(mas, mas + 4);
    for (int i = 0; i < 3; i++) {
        if (mas[i] != mas[i + 1]) {
            e--;
        }
    }
    cout << e;
}


#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    int array[250];
    int n , p , q;
    cin >> n >> p;
    int count = 0;

    for(int i =  0 ; i < p ; i++){
        cin >> array[i];
    }
    cin >> q;
    for(int i = p ; i < p + q ; i++){
        cin >> array[i];
    }

    sort(array , array+(p+q));

    for(int i = 0 ; i < p+q ; i++){
        if(array[i] != array[i+1]){
            count++;
        }
    }

    if(n == (count)){
        cout << "I become the guy." <<endl;
    }else{
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}


#include<iostream>
#include<set>
using namespace std;
int main(){
	int n,x,y;
	cin>>n;
	set<int> l;
	cin>>x;
	for(int i=0;i<x;i++){
		int u;
		cin>>u;
		l.insert(u);
	}
	cin>>y;
		for(int i=0;i<y;i++){
		int v;
		cin>>v;
		l.insert(v);
	}
	if(l.size()==n){
		cout<<"I become the guy."<<endl;
	}
	else{
		cout<<"Oh, my keyboard!"<<endl;
	}
	return 0;
}


#include<iostream>
#include<set>
using namespace std;
int main(){
	int n,x,y;
	cin>>n;
	set<int> l;
	cin>>x;
	for(int i=0;i<x;i++){
		int u;
		cin>>u;
		l.insert(u);
	}
	cin>>y;
		for(int i=0;i<y;i++){
		int v;
		cin>>v;
		l.insert(v);
	}
	if(l.size()==n){
		cout<<"I become the guy"<<endl;
	}
	else{
		cout<<"Oh, my keyboard!"<<endl;
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
     int t;
     cin>>t;
        int m,n,a[1000],b[1000],sum=0,s=0,flag=0;
        cin>>m;
        for(int i=0;i<m;i++)
        cin>>a[i];
        cin>>n;
        for(int i=0;i<n;i++)
        cin>>b[i];
        for(int i=0;i<m;i++)
        sum+=a[i];

        s=(t*(t+1))/2;

        s=s-sum;

        for(int i=0;i<n;i++){
        if(s==b[i]){
        flag=1;
        }
        }
        if(flag)
        cout<<"I become the guy."<<endl;
        else
        cout<<"Oh, my keyboard!"<<endl;
return 0;
     }


#include <iostream>
#include<algorithm>
#include<sstream>
#include <math.h>
using namespace std;

int main() {
     int n,p,q,c=0;
     cin>>n>>p;
     int a[300];
     for(int i=0;i<p;i++)
     cin>>a[i];
     cin>>q;
    for(int i=p;i<p+q;i++)
    cin>>a[i];
    sort(a,a+(p+q));
    for(int i=0;i<p+q;i++){
            if(a[i]!=a[i+1])
            c++;
    }
    if(c==n)
    cout<<"I become the guy."<<endl;
    else
    cout<<"Oh, my keyboard!"<<endl;
}


#include<iostream>
using namespace std;
int main(){
     int t;
     cin>>t;
        int m,n,a[1000],b[1000],sum=0,s=0,flag=0;
        cin>>m;
        for(int i=0;i<m;i++)
        cin>>a[i];
        cin>>n;
        for(int i=0;i<n;i++)
        cin>>b[i];
        for(int i=0;i<m;i++)
        sum+=a[i];

        s=(t*(t+1))/2;

        s=s-sum;

        for(int i=0;i<n;i++){
        if(s==b[i]){
        flag=1;
        }
        }
        if(flag)
        cout<<"yes";
        else
        cout<<"no";
return 0;
     }


#include <iostream>
#include <algorithm>
#include <vector>

int main() {

    size_t count{};
    std::vector<int> result{};
    int n{};
    int p{};
    int x{};
    int y{};
    std::cin >> n;

    std::cin >> p;
    for (int i{}; i < p; ++i) {
        std::cin >> x;
        count = std::count(result.begin(), result.end(), x);
        if (count == 0) {
            result.push_back(x);
        }
    }
    std::cin >> p;
    for (int i{}; i < p; ++i) {
        std::cin >> y;
        count = std::count(result.begin(), result.end(), y);
        if (count == 0) {
            result.push_back(y);
        }
    }

    std::cout << ((result.size() == n) ? "I become the guy." : "Oh, my keyboard!") << std::endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>

int main() {

    size_t count{};
    std::vector<int> result{};
    int n{};
    int p{};
    int x{};
    int y{};
    std::cin >> n;

    std::cin >> p;
    for (int i{}; i < p; ++i) {
        std::cin >> x;
        count = std::count(result.begin(), result.end(), x);
        if (count == 0) {
            result.push_back(x);
        }
    }
    std::cin >> p;
    for (int i{}; i < p; ++i) {
        std::cin >> y;
        count = std::count(result.begin(), result.end(), y);
        if (count == 0) {
            result.push_back(y);
        }
    }

    std::cout << ((result.size() == n) ? "I become the guy." : "Oh, my keyboard!") << std::endl;
    system("pause");
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

int main() {

    int n{};
    std::cin >> n;
    int temp{};
    std::vector<int> x{};
    std::vector<int> y{};
    int count{};
    for (int i{}; i < n; ++i) {
        std::cin >> temp;
        if (std::count(x.begin(), x.end(), temp) < 1) {
            ++count;
            x.push_back(temp);
        }
    }

    for (int i{}; i< n-1; ++i) {
        std::cin >> temp;
        if (std::count(x.begin(), x.end(), temp) < 1) {
            ++count;
            x.push_back(temp);
        }
    }

    std::cout << ((count == n) ? "I become the guy." : "Oh, my keyboard!") << std::endl;
    system("pause");
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

int main() {

    int n{};
    std::cin >> n;
    int temp{};
    std::vector<int> x{};
    std::vector<int> y{};
    int count{};
    for (int i{}; i < n; ++i) {
        std::cin >> temp;
        if (std::count(x.begin(), x.end(), temp) < 1) {
            if (temp != 0) {
                ++count;
                x.push_back(temp);
            }
        }
    }

    for (int i{}; i< n-1; ++i) {
        std::cin >> temp;
        if (std::count(x.begin(), x.end(), temp) < 1) {
            if (temp != 0) {
                ++count;
                x.push_back(temp);
            }
        }
    }

    std::cout << ((count == n) ? "I become the guy." : "Oh, my keyboard!") << std::endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

int main() {

    int n{};
    std::cin >> n;
    int temp{};
    std::vector<int> x{};
    std::vector<int> y{};
    int count{};
    for (int i{}; i < n; ++i) {
        std::cin >> temp;
        if (std::count(x.begin(), x.end(), temp) < 1) {
            ++count;
            x.push_back(temp);
        }
    }

    for (int i{}; i< n-1; ++i) {
        std::cin >> temp;
        if (std::count(x.begin(), x.end(), temp) < 1) {
            ++count;
            x.push_back(temp);
        }
    }

    std::cout << ((count == n) ? "I become the guy." : "Oh, my keyboard!") << std::endl;
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
	int n,x[100],/*y[100],*/count =0;
	cin >> n;
	for (int i = 0; i < 2*n-1; i++)
	{
		cin >> x[i];
		if (x[i] <= 0)
			cin >> x[i];
	}

	for (int k = 1; k <= n; k++)
	{
		for (int i = 0; i < 2 * n - 1; i++)
		{
			if (k == x[i])
			{
				count++;
				break;
			}
		}
	}
	if (count == n)
		cout << "I become the guy. \n";
	else
		cout << "Oh, my keyboard! \n";

}


#include <iostream>
using namespace std;
int main()
{
	int n,x[200],/*y[100],*/count =0,n1,n2;
	cin >> n;
	cin >> n1;
	for (int i = 0; i < n1; i++)
	{
		cin >> x[i];
	}
	cin >> n2;
	for (int i = n1; i < n1+n2; i++)
	{
		cin >> x[i];
	}
	for (int k = 1; k <= n; k++)
	{
		for (int i = 0; i < n1+n2; i++)
		{
			if (x[i] == k)
			{
				count++;
				break;
			}
		}
	}

	if (count == n)
		cout << "I become the guy. \n";
	else
		cout << "Oh, my keyboard! \n";

}


#include <iostream>
using namespace std;
int main()
{
	int n,x[100],y[100],count =0,n1,n2;
	cin >> n;
	cin >> n1;
	for (int i = 0; i < n1; i++)
	{
		cin >> x[i];
		if (x[i] <= 0)
			cin >> x[i];
	}
	cin >> n2;
	for (int i = 0; i < n2; i++)
	{
		cin >> y[i];
		if (y[i] <= 0)
			cin >> y[i];
	}
	for (int k = 1; k <= n; k++)
	{
		for (int i = 0; i < n1; i++)
		{
			if (x[i] == k)
			{
				count++;
				break;
			}
			else
			{
				if (k == y[i])
				{
					count++;
					break;
				}
			}
		}
	}

	if (count == n)
		cout << "I become the guy. \n";
	else
		cout << "Oh, my keyboard! \n";

}


#include <iostream>
using namespace std;
int main()
{
	int n,x[200],/*y[100],*/count =0;
	cin >> n;
	for (int i = 0; i < 2*n-1; i++)
	{
		cin >> x[i];
		if (x[i] <= 0)
			cin >> x[i];
	}

	for (int k = 1; k <= n; k++)
	{
		for (int i = 0; i < 2 * n - 1; i++)
		{
			if (k == x[i])
			{
				count++;
				break;
			}
		}
	}
	if (count == n)
		cout << "I become the guy. \n";
	else
		cout << "Oh, my keyboard! \n";

}


//
//  main.cpp
//  Playing
//
//  Created by Aya Shaker on 2/28/20.
//  Copyright © 2020 Aya Shaker. All rights reserved.
//

#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main(int argc, const char * argv[])
{
    int n= 0;
    int p;
    int q;
    int v;
    vector<int> ap;
    vector<int> aq;
    vector<int>a;
    int pp;
    int qq;
    cin>>n;
    cin>>p;
     pp = p;
    while(pp!=0)
    {
        cin>>v;
        ap.push_back(v);
        pp--;
    }

    cin>>q;
    qq = q;
    while(qq!=0)
    {
        cin>>v;
        aq.push_back(v);
        qq--;
    }

    for(int i=0;i<n+1;i++)
    {
        a.push_back(0);
    }
    int p2 = 0;
    bool flag = false;
    int nnp =n;
    int nnq = n;

    while(nnp!=0)
    {
        for(int i=0;i<=ap.size();i++)
        {
            if(ap[i] == nnp)
            {
                a[nnp] = 1;
            }
        }
        nnp--;
    }
    while(nnq!=0)
    {
        for(int i=0;i<=aq.size();i++)
        {
            if(aq[i] == nnq)
            {
                a[nnq] = 1;
            }
        }

        nnq--;

    }
    bool f = false;
    a[0]=1;
    for(int i =0 ;i<n+1;i++)
    {
        if(a[i]!= 1)
        {

            f= true;
        }
    }
    if(f == false)
    {
        cout<<"I become the guy."<<endl;
    }
    if( f == true)
    {
            cout<<"Oh, my keyboard!"<<endl;
    }

    return 0;
}


//
//  main.cpp
//  Playing
//
//  Created by Aya Shaker on 2/28/20.
//  Copyright © 2020 Aya Shaker. All rights reserved.
//

#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main(int argc, const char * argv[])
{
    int n= 0;
    int p;
    int q;
    vector<int> ap;
    vector<int> aq;
    vector<int>a;
    int pp;
    int qq;
    cout<<"Enter n"<<endl;
    cin>>n;
    cin>>p;
     pp = p;
    while(pp!=0)
    {
        cin>>v;
        ap.push_back(v);
        pp--;
    }

    cin>>q;
    qq = q;
    while(qq!=0)
    {
        cin>>v;
        aq.push_back(v);
        qq--;
    }

    for(int i=0;i<n+1;i++)
    {
        a.push_back(0);
    }
    int p2 = 0;
    bool flag = false;
    int nnp =n;
    int nnq = n;

    while(nnp!=0)
    {
        for(int i=0;i<=ap.size();i++)
        {
            if(ap[i] == nnp)
            {
                a[nnp] = 1;
            }
        }
        nnp--;
    }
    while(nnq!=0)
    {
        for(int i=0;i<=aq.size();i++)
        {
            if(aq[i] == nnq)
            {
                a[nnq] = 1;
            }
        }

        nnq--;

    }
    bool f = false;
    a[0]=1;
    for(int i =0 ;i<n+1;i++)
    {
        if(a[i]!= 1)
        {

            f= true;
        }
    }
    if(f == false)
    {
        cout<<"I become the guy."<<endl;
    }
    if( f == true)
    {
            cout<<"Oh, my keyboard!"<<endl;
    }

    return 0;
}


//
//  main.cpp
//  Playing
//
//  Created by Aya Shaker on 2/28/20.
//  Copyright © 2020 Aya Shaker. All rights reserved.
//

#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main(int argc, const char * argv[])
{
    int n= 0;
    int p;
    int q;
    int v;
    vector<int> ap;
    vector<int> aq;
    vector<int>a;
    int pp;
    int qq;
    cin>>n;
    cin>>p;
     pp = p;
    while(pp!=0)
    {
        cin>>v;
        ap.push_back(v);
        pp--;
    }

    cin>>q;
    qq = q;
    while(qq!=0)
    {
        cin>>v;
        aq.push_back(v);
        qq--;
    }

    for(int i=0;i<n+1;i++)
    {
        a.push_back(0);
    }
    int p2 = 0;
    bool flag = false;
    int nnp =n;
    int nnq = n;
    int s=0;
    if(ap.size()>aq.size())
    {
        s =ap.size();
    }
    else
    {
        s = aq.size();
    }
    while(nnp!=0)
    {
        for(int i=0;i<=s;i++)
        {
            if(ap.size()!=0)
            {
            if(ap[i] == nnp)
            {
                a[nnp] = 1;
            }
            }
        if(aq.size()!=0)
        {
            if(aq[i] == nnp)
            {
                a[nnp] = 1;
            }
        }
        }
        nnp--;
    }
    bool f = false;
    a[0]=1;
    for(int i =0 ;i<n+1;i++)
    {
        if(a[i]!= 1)
        {

            f= true;
        }
    }
    if(f == false)
    {
        cout<<"I become the guy."<<endl;
    }
    if( f == true)
    {
            cout<<"Oh, my keyboard!"<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <int, int> ii;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <ii> vii;
typedef vector <vii> vvii;
#define endl '\n'
#define PB push_back
#define MP make_pair
#define OO (1000000000)         // ToDo
#define EPS (1e-9)              // ToDo
#define MOD (1000000007)        // ToDo
#define all(v) ((v).begin()),((v).end())
#define DEBUG(x) cout<< #x <<" = "<<"\""<< (x) <<"\""<<endl
#define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
void read_file(bool outToFile = true){
#ifdef LOCAL_TEST
    #define LL "%lld"
    freopen("in.in", "rt", stdin);
    if(outToFile)
    freopen("out.out", "wt", stdout);
#else
    #define LL "%I64d"
#endif
}
//
#define vMax 100+9
double memo[vMax][vMax][vMax];
int r, s, p;
//
double prob(int x, int y, int z, int who){
    double A[] = {x, y, z, x};
    return A[who] * A[who+1] / (A[0] * A[1] + A[1] * A[2] + A[2] * A[0]);
}
double rec(int x, int y, int z){
    if(x == 0) return 0;
    if(y == 0) return 0;
    if(z == 0) return 1;

    double &ret = memo[x][y][z];
    if(ret > -100) return ret;
    ret = 0;

    ret += prob(x, y, z, 0) * rec(x, y-1, z);
    ret += prob(x, y, z, 1) * rec(x, y, z-1);
    ret += prob(x, y, z, 2) * rec(x-1, y, z);

    return ret;
}
//
int main()
{
    read_file();
    while(cin>>r>>s>>p)
    {
        // init()
        {
            for(int i=0; i<vMax; i++)
                for(int j=0; j<vMax; j++)
                    for(int k=0; k<vMax; k++)
                        memo[i][j][k] = -1000;
        }

        cout<< setprecision(25);
        cout<< rec(r, s, p) <<' ';
        cout<< rec(s, p, r) <<' ';
        cout<< rec(p, r, s) <<' ';
        cout<<endl;
    }
}


//In C<>de We Trust :D
#include <bits/stdc++.h>

using namespace std;

#define MohammadAmin main()
#define mpair make_pair
#define endl "\n"
#define c_false ios_base::sync_with_stdio(false)
#define pushb push_back
#define pushf push_front
#define popb pop_back
#define popf pop_front
#define sz size()
#define X first
#define Y second
#define ashar(a) cout << fixed << setprecision((a))
#define reset(a,b) memset(a, b, sizeof(a))
#define min(x, y) ((x) < (y) ? (x) : (y))
#define max(x, y) ((x) > (y) ? (x) : (y))
#define for0(a, n) for (int (a) = 0; (a) < (n); (a)++)
#define for1(a, n) for (int (a) = 1; (a) <= (n); (a)++)
#define rof0(a, n) for (int (a) = (n); (a) >= 0; (a)--)
#define For(i, a, n) for (int (i) = (a); (i) <= (n); (i)++)
#define rof(i, n, a) for (int (i) = (n); (i) >= (a); (i)--)

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<char, char> pcc;

const ll INF = 1e9, n_ = 20;
ll gcd (ll a, ll b) {return ( a ? gcd(b%a, a) : b );}
ll power(ll a, ll n) {ll p = 1;while (n > 0) {if(n%2) {p = p * a;} n >>= 1; a *= a;} return p;}
ld dp[n_][n_][n_], ansR, ansS, ansP, cur;
int R, S, P, p, x, y, z, t;

int MohammadAmin {
	c_false;
	cin >> R >> S >> P;
	dp[R][S][P] = 1;
	rof(sum, R + S + P, 1) {
		rof(r, R, 0) {
			rof(s, S, 0) {
				p = sum - r - s;
				if (p < 0 || p > P) continue;
				if ((r == 0 && s == 0) || (r == 0 && p == 0) || (s == 0 && p == 0)) continue;
				//cerr << r << " " << s << " " << p << " " << dp[r][s][p] << "\n";
				x = r * s;
				y = r * p;
				z = s * p;
				t = x + y + z;
				cur = dp[r][s][p];
				if (r > 0) dp[r-1][s][p] += cur * y / t;
				if (s > 0) dp[r][s-1][p] += cur * x / t;
				if (p > 0) dp[r][s][p-1] += cur * z / t;
			}
		}
	}
	for1(i, R) ansR += dp[i][0][0];
	for1(i, S) ansS += dp[0][i][0];
	for1(i, P) ansP += dp[0][0][i];
	ashar(12);
	cout << ansR << " " << ansS << " " << ansP << endl;
	return 0;
}