Codeforces problem 546 C

http://codeforces.com/problemset/problem/546/C

my code-
#include<bits/stdc++.h>
#define ff first
#define ss second
#define all© c.begin(), c.end()
#define present(container, element) (container.find(element) != container.end())
#define cpresent(container, element) (find(all(container),element) != container.end())
#define sz(a) int((a).size())
#define pb push_back
#define loop(start,end) for(int i=start;i<end;i++)
#define ll long long int
#define pii pair < int , int >
#define mset(x,v) memset(x, v, sizeof(x)) //search it
using namespace std;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;

int main ()
{
ios_base::sync_with_stdio(false);cout.tie(0);cin.tie(0);
int n;
cin>>n;
int k1;cin>>k1;
queue q1,q2,a1,a2;
loop(0,k1)
{
int temp;cin>>temp;
q1.push(temp);a1.push(temp);
}
int k2;cin>>k2;
loop(0,k2)
{
int temp;cin>>temp;
q2.push(temp);a2.push(temp);
}
while(true)
{
int wars=0;
if(q1.empty())
{
cout<<wars<<" “<<1;break;
}
if(q2.empty())
{
cout<<wars<<” "<<2;break;
}
wars++;
int f1=q1.front();int f2=q2.front();q1.pop();q2.pop();
if(f1>f2)
{
q1.push(f2);q1.push(f1);
}
else
{
q2.push(f1);q2.push(f2);
}
if((q1==a1&&q2==a2)||(q1==a2&&q2==a1))
{
cout<<-1;break;
}
}
return 0;
}

output shows that queue q1 is empty initially. why is that so?