t=int(input())
for i in range(t):
n,m,x,y=map(int,input().split())
print(1,1,n,m)
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>> t;
while(t--){
int n,m,i,j;
cin>>n>>m>>i>>j;
if((i==1 && j==1 )||( i==n && j==m)){
cout<< n << " 1" << " 1 " << m << endl;
}
else if((i==n && j==1 )||( i==1 && j==m)){
cout<< "1"<<" 1 "<< n << " " << m << endl;
}
else{
cout<< "1"<<" 1 "<< n << " " << m << endl;
}
}return 0;
}
1144A - Diverse Strings | 1553B - Reverse String |
1073A - Diverse Substring | 630N - Forecast |
312B - Archer | 34D - Road Map |
630I - Parking Lot | 160B - Unlucky Ticket |
371B - Fox Dividing Cheese | 584B - Kolya and Tanya |
137B - Permutation | 550C - Divisibility by Eight |
5A - Chat Servers Outgoing Traffic | 615A - Bulbs |
5B - Center Alignment | 549A - Face Detection |
535B - Tavas and SaDDas | 722C - Destroying Array |
366A - Dima and Guards | 716B - Complete the Word |
1461C - Random Events | 1627A - Not Shading |
141B - Hopscotch | 47B - Coins |
1466C - Canine poetry | 74A - Room Leader |
1333D - Challenges in school №41 | 1475B - New Year's Number |
461A - Appleman and Toastman | 320B - Ping-Pong (Easy Version) |