Code not being accepted

Please check my code

#include
#include
using namespace std;

int main(){
int t;
cin>>t;
for(int i=0; i<t; i++){
int n;
cin>>n;
list l1;
for(int i=0; i<n; i++){
int t;
cin>>t;
l1.push_back(t);
}
int m;
cin>>m;
list l2;
for(int i=0; i<m; i++){
int t;
cin>>t;
l2.push_back(t);
}
list l3;
while(!l1.empty() and !l2.empty()){
if(l1.front()<l2.front()){
l3.push_back(l1.front());
l1.pop_front();
}
else{
l3.push_back(l2.front());
l2.pop_front();
}
}
if(l1.empty()){
while(!l2.empty()){
l3.push_back(l2.front());
l2.pop_front();
}
}
else{
while(!l1.empty()){
l3.push_back(l1.front());
l1.pop_front();
}
}
for(auto l:l3){
cout<<l<<" ";
}
}
return 0;
}

@RishabhK, check here https://ide.codingblocks.com/s/657677

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.