import sys
n=int(input(""))
a=input("")
s=input("")
if (len(a)!=n)and(len(s)!=n):
    sys.exit()
else:
    res = [int(i) for i in a]
    re= [int(i) for i in s]
    c=0
    for i,j in zip(res,re):
        if((i-j)<4)and(i>j):
            while(i!=j):
                i-=1
                c+=1
        elif((i-j)>4)and(i>j):
            while(i!=0):
                if(i==9):
                    i=0
                    c+=1
                else:
                    i+=1
                    c+=1
        elif((j-i)>4)and(i<j):
            while(i!=j):
                if(i==0):
                    i==9
                    c+=1
                else:
                    i-=1
                    c+=1
        else:
            while(i!=j):
                i+=1
                c+=1
    print(c)


import sys
def codes(inp,out):
    r=0
    while(inp>0)or(out>0):
        inpc=inp%10
        outc=out%10
        r+=min(abs(inpc-outc),10-abs(inpc-outc))
        inp=int(inp/10)
        out=int(out/10)
    return r
n=int(input())
a=input()
b=input()
if(len(a)!=n)or(len(b)!=n):
    sys.exit()
else:
    a1=float(a)
    b1=float(b)
    print(int(codes(a1,b1)))


n=int(input())
a=input()
b=input()
c=int(0)
for i in range(n):

        c1=abs(int(a[i])-int(b[i]))
        c2=abs(int("1"+str(a[i]))-int(b[i]))
        c3=abs(int("1"+str(b[i]))-int(a[i]))

        c=int(c)+min(c1,c2,c3)
print(c)


n=int(input())
a=input()
b=input()
c=int(0)
if n>1000:
        n=1000
for i in range(n):

        c1=abs(int(a[i])-int(b[i]))
        c2=abs(int(10+int(a[i]))-int(b[i]))
        c3=abs(int(10+int(b[i]))-int(a[i]))

        c=int(c)+min(c1,c2,c3)
print(c)


n=int(input())
a=input()
b=input()
c=int(0)
if n>100:
        n=1000
for i in range(n):

        c1=abs(int(a[i])-int(b[i]))
        c2=abs(int(10+int(a[i]))-int(b[i]))
        c3=abs(int(10+int(b[i]))-int(a[i]))

        c=int(c)+min(c1,c2,c3)
print(c)


n=int(input())
a=input()
b=input()
c=int(0)
for i in range(n):

        c1=abs(int(a[i])-int(b[i]))
        c2=abs(int(10+int(a[i]))-int(b[i]))
        c3=abs(int(10+int(b[i]))-int(a[i]))

        c=int(c)+min(c1,c2,c3)
print(c)


from math import *
n=int(input())
x=input()
y=input()
z=0
for i in range(n):
	z=z+min(fabs(int(x[i])-int(y[i])),fabs(fabs(int(x[i])-int(y[i]))-10))
print(int(z))


n=int(input())
x=input()
y=input()
z=0
for i in range(n):
    z=z+min(abs(int(x[i])-int(y[i])),abs(abs(int(x[i])-int(y[i]))-10))
print(int(z))


from math import *
n=int(input())
x=input()
y=input()
for i in range(n):
	z=z+min(fabs(int(x[i])-int(y[i])),fabs(fabs(int(x[i])-int(y[i]))-10))
print(int(z))


n=int(input())
x=input()
y=input()
for i in range(n):
	z=z+min(fabs(int(x[i])-int(y[i])),fabs(fabs(int(x[i])-int(y[i]))-10))
print(int(z))


n = int(input())
o = int(input())
p = int(input())

res = 0;

while o > 0 and p > 0:
    l1 = o % 10;
    l2 = p % 10;
    print(min(abs(l2 - l1), min(abs(9 - l1 + l2), abs(9 - l2 + l1))))
    res += min(abs(l2 - l1), min(abs(10 - l1 + l2), abs(10 - l2 + l1)))
    o = o // 10
    p = p // 10

print(res)


n = int(input())
o = int(input())
p = int(input())

res = 0;

while o > 0 and p > 0:
    l1 = o % 10;
    l2 = p % 10;
    res += min(abs(l2 - l1), min(abs(10 - l1 + l2), abs(10 - l2 + l1)))
    o = o // 10
    p = p // 10

print(res)


n = int(input())
o = int(input())
p = int(input())
ans = 0
for i in range(n):
    if abs(o%10 - p%10) > 10 - abs(o%10 - p%10):
        ans += 10 - abs(o%10 - p%10)
        o = int(o/10)
        p = int(p/10)
    else:
        ans += abs(o%10 - p%10)
        o = int(o/10)
        p = int(p/10)
print(ans)


n=int(input())
a=input()
b=input()
x=0
for i in range(0,n):
    e=abs(10-int(a[i])+int(b[i]))
    f=abs(10-int(b[i])+int(a[i]))
    c=min(e,f)
    d=abs(int(b[i])-int(a[i]))
    if(c>=d):
        x+=d
    else:
        x+=c
print(x)


n=int(input())
a=input()
b=input()
x=0
for i in range(0,n):
    e=abs(10-int(a[i])+int(b[i]))
    f=abs(10-int(b[i])+int(a[i]))
    c=min(e,f)
    d=abs(int(b[i])-int(a[i]))
    print("%c %c"%(a[i],b[i]))
    if(c>=d):
        x+=d
    else:
        x+=c
    print(x)
print(x)


a=int(input())
b=int(input())
c=int(input())
kol=0
while b>0:
    v=b%10
    g=c%10
    if abs(v-g)>5:
        kol+=10-abs(v-g)
    else:
        kol+=abs(v-g)
    b=b//10
    c=c//10
print(kol)


n=int(input())
s1=input()
s2=input()
s=0
for i in range(n):
    d1= int(s1[i])
    d2 = int(s2[i])
    s+=min(abs(d2-d1), d1 + 10 - d2, d2 + 10 -d1)
print(s)


a=int(input())
b=int(input())
c=int(input())
kol=0
for i in range(a):
    v=b%10
    g=c%10
    if abs(v-g)>5:
        kol+=10-abs(v-g)
    else:
        kol+=abs(v-g)
    b=b//10
    c=c//10
print(kol)


d=int(input())
o=int(input())
f=int(input())
i=d
c=0
while i>=1:
    a=o%10
    b=f%10
    M=max(a,b)
    m=min(a,b)
    diff=M-m
    c=c+min(diff,10-diff)
    o/=10
    f/=10
print(c)


d=int(input())
o=int(input())
f=int(input())
i=d
c=0
while i>=1:
    a=o%10
    b=f%10
    M=max(a,b)
    m=min(a,b)
    diff=M-m
    c=c+min(diff,10-diff)
    o=o//10
    f=f//10
print(c)


d=int(input())
o=int(input())
f=int(input())
i=d
c=0
while i>=1:
    a=o%10
    b=f%10
    M=max(a,b)
    m=min(a,b)
    diff=M-m
    c=c+min(diff,10-diff)
    o/=10
    f/=10
    i-=1
print(c)


d=int(input())
o=int(input())
f=int(input())
i=d
c=0
while i>=1:
    a=o%10
    b=f%10
    M=max(a,b)
    m=min(a,b)
    diff=M-m
    c=c+min(diff,10-diff)
    o=o//10
    f=f//10
    i-=1
print(c)


#!/usr/bin/python

import sys;

ip_f = open(sys.argv[1], 'r');

T = int(ip_f.readline());

curr = ip_f.readline();
final = ip_f.readline();

total = 0;
for i in range(T):
	diff_1 = int(curr[i]) - int(final[i]);
	if diff_1 < 0:
		diff_1 += 10;

	diff_2 = int(final[i]) - int(curr[i]);
	if diff_2 < 0:
		diff_2 += 10;

	if diff_1 < diff_2:
		total += diff_1;
	else:
		total += diff_2;

print(total);


#!/usr/bin/python3

import sys;

T = int(input());

curr = input();
final = input();

total = 0;
for i in range(T):
	diff_1 = int(curr[i]) - int(final[i]);
	if diff_1 < 0:
		diff_1 += 10;

	diff_2 = int(final[i]) - int(curr[i]);
	if diff_2 < 0:
		diff_2 += 10;

	if diff_1 < diff_2:
		total += diff_1;
	else:
		total += diff_2;

print(total);
exit(0);


n = int(input())
o = input()
w= input()
p=0
for i in range(0,n):
    v = int(o[i])-int(w[i])
    if(v<0):
        v = -v
    if(v>5):
        v = 10-v
    p = p+v
print(p)


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.Arrays;

public class practice {
    public static void main(String[] args) throws IOException {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        int k = Integer.parseInt(r.readLine());
        for(int t=0;t<k;t++) {
            String[] data = (r.readLine()).split(" ");
            System.out.println(data[0]+" "+data[2]+" "+data[2]);
        }

    }
}


import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        while(t-->0){
            long a = s.nextLong();
            long b = s.nextLong();
            long c = s.nextLong();
            long d = s.nextLong();

            if(a+b > c)
            System.out.println(a+" "+b+" "+c);
            else
            System.out.println(b+" "+c+" "+d);

        }
    }
}


import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        while(t-->0){
            long a = s.nextLong();
            long b = s.nextLong();
            long c = s.nextLong();
            long d = s.nextLong();

            if(a+b >= c)
            System.out.println(a+" "+b+" "+c);
            else
            System.out.println(b+" "+c+" "+d);

        }
    }
}


import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        while(t-->0){
            long a = s.nextLong();
            long b = s.nextLong();
            long c = s.nextLong();
            long d = s.nextLong();

            System.out.println(a+" "+b+" "+c);

        }
    }
}


import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        while(t-->0){
            long a = s.nextLong();
            long b = s.nextLong();
            long c = s.nextLong();
            long d = s.nextLong();

            System.out.println(c+" "+d+" "+d);

        }
    }
}


import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int t = s.nextInt();
        while(t-->0){
            long a = s.nextLong();
            long b = s.nextLong();
            long c = s.nextLong();
            long d = s.nextLong();

            // if(a+b > c)
            // System.out.println(a+" "+b+" "+c);
            // else if(b+c > d)
            System.out.println(b+" "+c+" "+c);
            //else if()

        }
    }
}


import java.util.Scanner;

public class Triangle {
	public static void main(String[] args) {

		Scanner s=new Scanner(System.in);
		int t=s.nextInt();

		while(t-->0)
		{
			int a=s.nextInt();
			int b=s.nextInt();
			int c=s.nextInt();

			System.out.println(b+" "+b+" "+c);
		}
	}

}


import java.util.Scanner;

public class Triangle {
	public static void main(String[] args) {

		Scanner s=new Scanner(System.in);
		int t=s.nextInt();

		while(t-->0)
		{
			int a=s.nextInt();
			int b=s.nextInt();
			int c=s.nextInt();

			System.out.println(b+" "+c+" "+c);
		}
	}

}


import java.util.Scanner;

public class Triangle {
	public static void main(String[] args) {

		Scanner s=new Scanner(System.in);
		int t=s.nextInt();

		while(t-->0)
		{
			int a=s.nextInt();
			int b=s.nextInt();
			int c=s.nextInt();
			int d=s.nextInt();

			System.out.println(b+" " +c+" "+c);
		}
	}

}


import java.io.*;
import java.util.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author billy
 */
public class CodeForces635Div2 {

    /**
     * @param args the command line arguments
     */
            static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
   static StringTokenizer st;

    public static void main(String[] args) throws IOException {

        int t = readInt();

        for (int i =0; i<t; i++){
            int a = readInt();
            int b = readInt();
            int c = readInt();
            int d = readInt();

            long x = b;
            long y = c;
            long z = d;

            long hi = z;
            long lo = c;

            while (x+y<=z){
                z = z -((hi-lo)/2);
                if (hi-lo == 1 && x+y<z){
                    z =y;
                }
                hi = z;
            }

            System.out.println(x + " " +y + " " +z);

        }

    }

   static String read () throws IOException {
       while (st == null || !st.hasMoreTokens())
           st = new StringTokenizer(br.readLine().trim());
       return st.nextToken();
   }
   static long readLong () throws IOException {
       return Long.parseLong(read());
   }
   static int readInt () throws IOException {
       return Integer.parseInt(read());
   }
   static double readDouble () throws IOException {
       return Double.parseDouble(read());
   }
   static char readChar () throws IOException {
       return read().charAt(0);
   }
   static String readLine () throws IOException {
       return br.readLine().trim();
   }

}


import java.io.*;
import java.util.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author billy
 */
public class CodeForces635Div2 {

    /**
     * @param args the command line arguments
     */
            static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
   static StringTokenizer st;

    public static void main(String[] args) throws IOException {

        int t = readInt();

        for (int i =0; i<t; i++){
            int a = readInt();
            int b = readInt();
            int c = readInt();
            int d = readInt();

            int x = b;
            int y = c;
            int z = d;

            int hi = z;
            int lo = c;

            while (x+y<z){
                z = z -((hi-lo)/2);
                hi = z;
            }

            System.out.println(x + " " + y + " " +z);

        }
    }

   static String read () throws IOException {
       while (st == null || !st.hasMoreTokens())
           st = new StringTokenizer(br.readLine().trim());
       return st.nextToken();
   }
   static long readLong () throws IOException {
       return Long.parseLong(read());
   }
   static int readInt () throws IOException {
       return Integer.parseInt(read());
   }
   static double readDouble () throws IOException {
       return Double.parseDouble(read());
   }
   static char readChar () throws IOException {
       return read().charAt(0);
   }
   static String readLine () throws IOException {
       return br.readLine().trim();
   }

}


import java.io.*;
import java.util.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author billy
 */
public class CodeForces635Div2 {

    /**
     * @param args the command line arguments
     */
            static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
   static StringTokenizer st;

    public static void main(String[] args) throws IOException {

        int t = readInt();

        for (int i =0; i<t; i++){
            int a = readInt();
            int b = readInt();
            int c = readInt();
            int d = readInt();

            long x = b;
            long y = c;
            long z = d;

            long hi = z;
            long lo = c;

            while (x+y<z){
                z = z -((hi-lo)/2);
                if (hi-lo == 1 && x+y<z){
                    z =y;
                }
                hi = z;
            }

            System.out.println(x + " " +y + " " +z);

        }

    }

   static String read () throws IOException {
       while (st == null || !st.hasMoreTokens())
           st = new StringTokenizer(br.readLine().trim());
       return st.nextToken();
   }
   static long readLong () throws IOException {
       return Long.parseLong(read());
   }
   static int readInt () throws IOException {
       return Integer.parseInt(read());
   }
   static double readDouble () throws IOException {
       return Double.parseDouble(read());
   }
   static char readChar () throws IOException {
       return read().charAt(0);
   }
   static String readLine () throws IOException {
       return br.readLine().trim();
   }

}


import java.io.*;
import java.util.*;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author billy
 */
public class CodeForces635Div2 {

    /**
     * @param args the command line arguments
     */
            static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
   static StringTokenizer st;

    public static void main(String[] args) throws IOException {

        int t = readInt();

        for (int i =0; i<t; i++){
            int a = readInt();
            int b = readInt();
            int c = readInt();
            int d = readInt();

            long x = b;
            long y = c;
            long z = d;

            long hi = z;
            long lo = c;

            while (x+y<=z){
                z = z -((hi-lo)/2);
                if (hi-lo == 1 && x+y<=z){
                    z =y;
                }
                hi = z;
            }

            System.out.println(x + " " +y + " " +z);

        }

    }

   static String read () throws IOException {
       while (st == null || !st.hasMoreTokens())
           st = new StringTokenizer(br.readLine().trim());
       return st.nextToken();
   }
   static long readLong () throws IOException {
       return Long.parseLong(read());
   }
   static int readInt () throws IOException {
       return Integer.parseInt(read());
   }
   static double readDouble () throws IOException {
       return Double.parseDouble(read());
   }
   static char readChar () throws IOException {
       return read().charAt(0);
   }
   static String readLine () throws IOException {
       return br.readLine().trim();
   }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AIchihimeAndTriangle solver = new AIchihimeAndTriangle();
        solver.solve(1, in, out);
        out.close();
    }

    static class AIchihimeAndTriangle {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int t = in.nextInt();

            while (t-- > 0) {
                solve(in, out);
            }
        }

        private void solve(InputReader in, PrintWriter out) {
            long[] a = new long[4];
            long[] b = new long[3];

            for (int i = 0; i < 4; i++) {
                a[i] = in.nextLong();
            }

            for (int i = 0; i < 3; i++) {
                b[i] = a[i];
            }

            for (int i = 0; i < 3; i++) {
                out.print(b[i]);
                out.print(' ');
            }
            out.println();

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AIchihimeAndTriangle solver = new AIchihimeAndTriangle();
        solver.solve(1, in, out);
        out.close();
    }

    static class AIchihimeAndTriangle {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int t = in.nextInt();

            while (t-- > 0) {
                solve(in, out);
            }
        }

        private void solve(InputReader in, PrintWriter out) {
            long[] a = new long[4];
            long[] b = new long[3];

            for (int i = 0; i < 4; i++) {
                a[i] = in.nextLong();
            }

            for (int i = 0; i < 2; i++) {
                b[i] = a[i + 1];
            }
            b[2] = a[2];

            for (int i = 0; i < 3; i++) {
                out.print(b[i]);
                out.print(' ');
            }
            out.println();
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AIchihimeAndTriangle solver = new AIchihimeAndTriangle();
        solver.solve(1, in, out);
        out.close();
    }

    static class AIchihimeAndTriangle {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int t = in.nextInt();

            while (t-- > 0) {
                solve(in, out);
            }
        }

        private void solve(InputReader in, PrintWriter out) {

            int[] a = new int[4];
            int[] b = new int[4];

            for (int i = 0; i < 4; i++) {
                a[i] = in.nextInt();
                b[i] = a[i];
            }

            for (int i = 0; i < 3; i++) {
                out.print(b[i]);
                out.print(' ');
            }
            out.println();

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AIchihimeAndTriangle solver = new AIchihimeAndTriangle();
        solver.solve(1, in, out);
        out.close();
    }

    static class AIchihimeAndTriangle {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int t = in.nextInt();

            while (t-- > 0) {
                solve(in, out);
            }
        }

        private void solve(InputReader in, PrintWriter out) {

            long[] a = new long[4];

            for (int i = 0; i < 4; i++) {
                a[i] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                out.print(a[i]);
            }
            out.println();

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        AIchihimeAndTriangle solver = new AIchihimeAndTriangle();
        solver.solve(1, in, out);
        out.close();
    }

    static class AIchihimeAndTriangle {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int t = in.nextInt();

            while (t-- > 0) {
                solve(in, out);
            }
        }

        private void solve(InputReader in, PrintWriter out) {

            long[] a = new long[4];

            for (int i = 0; i < 4; i++) {
                a[i] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                out.print(a[i]);
                out.print(' ');
            }
            out.println();

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        for(int f=0;f<t;f++){
            int a[]=new int[4];
            for(int i=0;i<4;i++){
                a[i]=sc.nextInt();
            }
            System.out.println(a[1]+" "+(a[2]+a[1])/2+" "+a[2]);
        }
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        StringBuilder str=new StringBuilder();
        int t=sc.nextInt();
        for(int f=0;f<t;f++){
            int a[]=new int[4];
            for(int i=0;i<4;i++){
                a[i]=sc.nextInt();
            }
            Arrays.sort(a);
            str.append(a[1]+" "+(a[2]+a[1])/2+" "+a[2]+"\n");
        }
        System.out.print(str);
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        StringBuilder str=new StringBuilder();
        int t=sc.nextInt();
        for(int f=0;f<t;f++){
            int a[]=new int[4];
            for(int i=0;i<4;i++){
                a[i]=sc.nextInt();
            }
            Arrays.sort(a);
            str.append(Math.max(a[0],a[1])+" "+Math.max(a[2],a[1])+" "+Math.min(a[2],a[3])+"\n");
        }
        System.out.print(str);
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        StringBuilder str=new StringBuilder();
        int t=sc.nextInt();
        for(int f=0;f<t;f++){
            int a[]=new int[4];
            for(int i=0;i<4;i++){
                a[i]=sc.nextInt();
            }
            str.append(a[1]+" "+(a[2]+a[1])/2+" "+a[2]+"\n");
        }
        System.out.print(str);
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        StringBuilder str=new StringBuilder();
        int t=sc.nextInt();
        for(int f=0;f<t;f++){
            int a[]=new int[4];
            for(int i=0;i<4;i++){
                a[i]=sc.nextInt();
            }
            Arrays.sort(a);
            str.append(Math.max(a[0],a[1])+" "+Math.max(a[2],a[1])+" "+Math.max(a[2],a[3])+"\n");
        }
        System.out.print(str);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class NextRound {
//    String res;

    public static void main(String[] args) {
        NextRound n = new NextRound();
        n.read();
//        System.out.prlongln(n.res);
    }

    void read() {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        try {
            int t = Integer.parseInt(bufferedReader.readLine());
            while (t-- != 0) {
                String[] s = bufferedReader.readLine().split(" ");
                long a, b, c, d;
                a = Long.parseLong(s[0]);
                b = Long.parseLong(s[1]);
                c = Long.parseLong(s[2]);
                d = Long.parseLong(s[3]);
                // x
                long x;
                x = b;
                // y
                long y;
                y=c;
                // z
                long z;
                if (c == d)
                    z = c;
                else
                    z = c + 1;
                System.out.printf("%d %d %d\n", x, y, z);
            }
        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class NextRound {
//    String res;

    public static void main(String[] args) {
        NextRound n = new NextRound();
        n.read();
//        System.out.prlongln(n.res);
    }

    void read() {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        try {
            int t = Integer.parseInt(bufferedReader.readLine());
            while (t-- != 0) {
                String[] s = bufferedReader.readLine().split(" ");
                long a, b, c, d;
                a = Long.parseLong(s[0]);
                b = Long.parseLong(s[1]);
                c = Long.parseLong(s[2]);
                d = Long.parseLong(s[3]);
                // x
                long x;
                x = b;
                // y
                long y;
                y=c;
                // z
                long z;
                if (c == d)
                    z = c;
                else
                    z = c + 1;
                System.out.printf("%d %d %d\n", b, c, c);
            }
        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class NextRound {
//    String res;

    public static void main(String[] args) {
        NextRound n = new NextRound();
        n.read();
//        System.out.prlongln(n.res);
    }

    void read() {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        try {
            int t = Integer.parseInt(bufferedReader.readLine());
            while (t-- != 0) {
                String[] s = bufferedReader.readLine().split(" ");
                long a, b, c, d;
                a = Long.parseLong(s[0]);
                b = Long.parseLong(s[1]);
                c = Long.parseLong(s[2]);
                d = Long.parseLong(s[3]);
                // x
                long x;
                x = b;
                // y
                long y;
                if (b == c)
                    y = c;
                else if (c - 1 == 0)
                    y = c;
                else
                    y = c - 1;
                // z
                long z;
                if (c == d)
                    z = c;
                else
                    z = c + 1;
                System.out.printf("%d %d %d\n", x, y, z);
            }
        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
    }
}


import java.util.*;
public class A635 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long t=sc.nextLong();
		while(t-->0) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			long c=sc.nextLong();
			long d=sc.nextLong();

			System.out.print(b+" "+c+" "+d);
			System.out.println();
		}

	}

}


import java.util.*;
public class A635 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long t=sc.nextLong();
		while(t-->0) {
			int a=sc.nextInt();
			int b=sc.nextInt();
			int c=sc.nextInt();
			int d=sc.nextInt();
			long sum=(long)b+(long)c;
			int z=0;
			for(int i=c;i<=d;i++) {
				if(i<sum) {
					z=i;
					break;
				}
			}

			System.out.print(b+" "+c+" "+z);
			System.out.println();
		}

	}

}


import java.util.*;
public class A635 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		while(t-->0) {
			int a=sc.nextInt();
			int b=sc.nextInt();
			int c=sc.nextInt();
			int d=sc.nextInt();

			System.out.print(b+" "+c+" "+d);
			System.out.println();
		}

	}

}


import java.util.*;
public class Codeforces{
	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
    	int t=sc.nextInt();
    	for(int i=0;i<t;i++) {
    		int a=sc.nextInt();
    		int b=sc.nextInt();
    		int c=sc.nextInt();
    		int d=sc.nextInt();
    		int x=b;
    		int y=c;
    		int z=(c+d)/2;
			System.out.print(x);
			System.out.print(y);
			System.out.print(z);
    	}
	}
}


import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
public class Codeforces{
	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
    	int t=sc.nextInt();
    	for(int i=0;i<t;i++) {
    		int a=sc.nextInt();
    		int b=sc.nextInt();
    		int c=sc.nextInt();
    		int d=sc.nextInt();
    		int x=b;
    		int y=c;
    		int z=0;
			if(x+y<d) z=ThreadLocalRandom.current().nextInt(c,x+y+1);
			else z=ThreadLocalRandom.current().nextInt(c,d+1);
			System.out.println(x+" "+y+" "+z);
    	}
	}
}


import java.util.*;
public class Codeforces{
	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
    	int t=sc.nextInt();
    	for(int i=0;i<t;i++) {
    		int a=sc.nextInt();
    		int b=sc.nextInt();
    		int c=sc.nextInt();
    		int d=sc.nextInt();
    		int x=b;
    		int y=c;
    		int z=(c+d)/2;
			System.out.print(x+" ");
			System.out.print(y+" ");
			System.out.print(z);
			System.out.println();
    	}
	}
}


import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
public class Codeforces{
	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
    	int t=sc.nextInt();
    	for(int i=0;i<t;i++) {
    		int a=sc.nextInt();
    		int b=sc.nextInt();
    		int c=sc.nextInt();
    		int d=sc.nextInt();
    		int x=b;
    		int y=c;
    		int z=0;
			if(x+y<d) z=ThreadLocalRandom.current().nextInt(c,x+y+1);
			else z=ThreadLocalRandom.current().nextInt(c,d+1);
    	}
	}
}


import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
public class Codeforces{
	public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
    	int t=sc.nextInt();
    	for(int i=0;i<t;i++) {
    		int a=sc.nextInt();
    		int b=sc.nextInt();
    		int c=sc.nextInt();
    		int d=sc.nextInt();
    		int x=b;
    		int y=c;
    		int z=0;
			if(x+y<=d) z=ThreadLocalRandom.current().nextInt(c,x+y);
			else z=ThreadLocalRandom.current().nextInt(c,d+1);
			System.out.println(x+" "+y+" "+z);
    	}
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.NoSuchElementException;

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static private long MOD = 1000000007;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    static int calcNumOfCombination(int n, int r) {
        int num = 1;
        for (int i = 1; i <= r; i++) {
            num = num * (n - i + 1) / i;
        }
        return num;
    }

    static long lcm(long a, long b) {
        long temp;
        long c = a;
        c *= b;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return (long) (c / b);
    }

    static long f(long n, Map<Long, Long> map) {
        if (n < 2)
            return 1;
        else if (map.containsKey(n)) {
            return map.get(n);
        } else {
            map.put(n, n * f(n - 2, map));
            return map.get(n);
        }

    }

    static long factorialUsingRecursion(int n) {
        if (n <= 2) {
            return n;
        }
        return n * factorialUsingRecursion(n - 1);
    }

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int T = fs.nextInt();
        loop: for (int t = 0; t < T; t++) {
            int a = fs.nextInt();
            int b = fs.nextInt();
            int c = fs.nextInt();
            int d = fs.nextInt();
            for (int i = a; i <= b; i++) {
                for (int j = c; j >= b; j--) {
                    int k = Math.max(c,Math.max(i-j, j - i) + 1);
                    if (k<=d && i + j > k && j + k > i && k + i > j) {
                        System.out.println(i + " " + j + " " + (int) k);
                        continue loop;
                    }

                }
            }
        }
    }

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.NoSuchElementException;

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static private long MOD = 1000000007;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    static int calcNumOfCombination(int n, int r) {
        int num = 1;
        for (int i = 1; i <= r; i++) {
            num = num * (n - i + 1) / i;
        }
        return num;
    }

    static long lcm(long a, long b) {
        long temp;
        long c = a;
        c *= b;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return (long) (c / b);
    }

    static long f(long n, Map<Long, Long> map) {
        if (n < 2)
            return 1;
        else if (map.containsKey(n)) {
            return map.get(n);
        } else {
            map.put(n, n * f(n - 2, map));
            return map.get(n);
        }

    }

    static long factorialUsingRecursion(int n) {
        if (n <= 2) {
            return n;
        }
        return n * factorialUsingRecursion(n - 1);
    }

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int T = fs.nextInt();
        loop: for (int t = 0; t < T; t++) {
            int a = fs.nextInt();
            int b = fs.nextInt();
            int c = fs.nextInt();
            int d = fs.nextInt();
            for (int i = a; i <= b; i++) {
                for (int j = b; j <= c; j++) {
                    int k = Math.max(c,Math.max(a - b, b - a) + 1);
                    if (k<=d && i + j > k && j + k > i && k + i > j) {
                        System.out.println(i + " " + j + " " + (int) k);
                        continue loop;
                    }

                }
            }
        }
    }

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.NoSuchElementException;

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static private long MOD = 1000000007;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    static int calcNumOfCombination(int n, int r) {
        int num = 1;
        for (int i = 1; i <= r; i++) {
            num = num * (n - i + 1) / i;
        }
        return num;
    }

    static long lcm(long a, long b) {
        long temp;
        long c = a;
        c *= b;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return (long) (c / b);
    }

    static long f(long n, Map<Long, Long> map) {
        if (n < 2)
            return 1;
        else if (map.containsKey(n)) {
            return map.get(n);
        } else {
            map.put(n, n * f(n - 2, map));
            return map.get(n);
        }

    }

    static long factorialUsingRecursion(int n) {
        if (n <= 2) {
            return n;
        }
        return n * factorialUsingRecursion(n - 1);
    }

    public static void main(String[] args) {
      FastScanner fs = new FastScanner();
        int T = fs.nextInt();
        loop: for (int t = 0; t < T; t++) {
            int a = fs.nextInt();
            int b = fs.nextInt();
            int c = fs.nextInt();
            int d = fs.nextInt();
            for (int i = a; i <= b; i++) {
                for (int j = b; j <= c; j++) {
                     int  k = Math.max(a - b, b - a) + 1;
                        if (i + j > k && j + k > i && k + i > j) {
                            System.out.println(i + " " + j + " " + (int) k);
                            continue loop;
                        }

                }
            }
        }
    }

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.NoSuchElementException;

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static private long MOD = 1000000007;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    static int calcNumOfCombination(int n, int r) {
        int num = 1;
        for (int i = 1; i <= r; i++) {
            num = num * (n - i + 1) / i;
        }
        return num;
    }

    static long lcm(long a, long b) {
        long temp;
        long c = a;
        c *= b;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return (long) (c / b);
    }

    static long f(long n, Map<Long, Long> map) {
        if (n < 2)
            return 1;
        else if (map.containsKey(n)) {
            return map.get(n);
        } else {
            map.put(n, n * f(n - 2, map));
            return map.get(n);
        }

    }

    static long factorialUsingRecursion(int n) {
        if (n <= 2) {
            return n;
        }
        return n * factorialUsingRecursion(n - 1);
    }

    public static void main(String[] args) {
      FastScanner fs = new FastScanner();
        int T = fs.nextInt();
        loop: for (int t = 0; t < T; t++) {
            int a = fs.nextInt();
            int b = fs.nextInt();
            int c = fs.nextInt();
            int d = fs.nextInt();
            for (int i = a; i <= b; i++) {
                for (int j = b; j <= c; j++) {
                    for (int k = c; k <= d; k++) {
                        if (i + j > k && j + k > i && k + i > j) {
                            System.out.println(i + " " + j + " " + (int) k);
                            continue loop;
                        }
                    }
                }
            }
        }
    }

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;

    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.NoSuchElementException;

public class Main {
    static int[] w = new int[100010];
    static int[] v = new int[100010];
    static private long MOD = 1000000007;

    static int chmin(int a, int b) {
        if (a > b) {
            a = b;
            return a;
        }
        return a;
    }

    static int chmax(int a, int b) {
        if (a < b) {
            a = b;
            return a;
        }
        return a;
    }

    static int calcNumOfCombination(int n, int r) {
        int num = 1;
        for (int i = 1; i <= r; i++) {
            num = num * (n - i + 1) / i;
        }
        return num;
    }

    static long lcm(long a, long b) {
        long temp;
        long c = a;
        c *= b;
        while ((temp = a % b) != 0) {
            a = b;
            b = temp;
        }
        return (long) (c / b);
    }

    static long f(long n, Map<Long, Long> map) {
        if (n < 2)
            return 1;
        else if (map.containsKey(n)) {
            return map.get(n);
        } else {
            map.put(n, n * f(n - 2, map));
            return map.get(n);
        }

    }

    static long factorialUsingRecursion(int n) {
        if (n <= 2) {
            return n;
        }
        return n * factorialUsingRecursion(n - 1);
    }

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int T = fs.nextInt();
        loop: for (int t = 0; t < T; t++) {
            int a = fs.nextInt();
            int b = fs.nextInt();
            int c = fs.nextInt();
            int d = fs.nextInt();
            for (int i = a; i <= b; i++) {
                for (int j = b; j <= c; j++) {
                    int k = Math.max(a - b, b - a) + 1;
                while(k < c)
                        k++;
                    if (k<=d && i + j > k && j + k > i && k + i > j) {
                        System.out.println(i + " " + j + " " + (int) k);
                        continue loop;
                    }

                }
            }
        }
    }

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


import java.util.Scanner;

public class main {

    public static void main(String[] args) {
        int t,a,b,c,d,x,y,z;
        Scanner in=new Scanner(System.in);
        t=in.nextInt();
        for(int i=1;i<=t;i++)
        {
            a=in.nextInt();
            b=in.nextInt();
            c=in.nextInt();
            d=in.nextInt();
            if(b==1 && c==d)
            {
                 System.out.println(b+" "+c+" "+c);
                 continue;
            }

             System.out.println(b+" "+(d-1)+" "+(c+1));

        }
    }

}


import java.util.Scanner;

public class main {

    public static void main(String[] args) {
        int t,a,b,c,d,x,y,z;
        Scanner in=new Scanner(System.in);
        t=in.nextInt();
        for(int i=1;i<=t;i++)
        {
            a=in.nextInt();
            b=in.nextInt();
            c=in.nextInt();
            d=in.nextInt();
            if(b==1 && c==d)
            {
                 System.out.println(b+" "+c+" "+c);

            }
            else if(b==c && d>c)
            {
                 System.out.println(b+" "+(c)+" "+(c));
            }

            else
            {
               System.out.println(b+" "+(c)+" "+(c+1));
            }

        }
    }

}


import java.util.Scanner;

public class main {

    public static void main(String[] args) {
        int t,a,b,c,d,x,y,z;
        Scanner in=new Scanner(System.in);
        t=in.nextInt();
        for(int i=1;i<=t;i++)
        {
            a=in.nextInt();
            b=in.nextInt();
            c=in.nextInt();
            d=in.nextInt();
            if(b==1 )
            {
                 System.out.println(b+" "+c+" "+c);

            }
            else if(b==c && d>c)
            {
                 System.out.println(b+" "+(c)+" "+(c));
            }

            else
            {
               System.out.println(b+" "+(c)+" "+(c+1));
            }

        }
    }

}


import java.util.Scanner;

public class main {

    public static void main(String[] args) {
        int t,a,b,c,d,x,y,z;
        Scanner in=new Scanner(System.in);
        t=in.nextInt();
        for(int i=1;i<=t;i++)
        {
            a=in.nextInt();
            b=in.nextInt();
            c=in.nextInt();
            d=in.nextInt();
            System.out.println(b+" "+(c)+" "+(c));

        }
    }

}


import java.io.*;
import java.util.*;
public class GFG {
  public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        PrintWriter out=new PrintWriter(System.out);
        while (t-->0){
        int a=sc.nextInt();
        int b=sc.nextInt();
        int c=sc.nextInt();
        int d=sc.nextInt();
        out.println(b+" "+c+" "+c);
        out.flush();
        }
    }
}


import java.io.*;
import java.util.*;
public class GFG {
  public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        PrintWriter out=new PrintWriter(System.out);
        while (t-->0){
        int a=sc.nextInt();
        int b=sc.nextInt();
        int c=sc.nextInt();
        int d=sc.nextInt();
        int f=0;
        for(int i=a;i<=b;i+=a)
        {
             for(int j=b;j<=c;j+=b)
             {
                  for(int k=c;k<=d;k+=c)
                  {
                      if(i+j>k&&i+k>j&&j+k>i)
                      {
                          out.println(i+" "+j+" "+k);f=1;
                          break;
                      }
                  }
                if(f==1)
                break;
             }
             if(f==1)
             break;
        }
        out.flush();
        }
    }
}


import java.io.*;
import java.util.*;
public class GFG {
  public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        PrintWriter out=new PrintWriter(System.out);
        while (t-->0){
        int a=sc.nextInt();
        int b=sc.nextInt();
        int c=sc.nextInt();
        int d=sc.nextInt();
        int f=0;
        for(int i=a;i<=b;i+=a)
        {
             for(int j=b;j<=c;j+=b)
             {
                  for(int k=c;k<=d;k+=c)
                  {
                      if(i+j>k&&i+k>j&&j+k>i)
                      {
                          System.out.println(i+" "+j+" "+k);f=1;
                          break;
                      }
                  }
                if(f==1)
                break;
             }
             if(f==1)
             break;
        }
        }
    }
}


import java.util.Scanner;

public class Ichihime_and_Triangle {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();

		while(t-- > 0)
		{
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();

			System.out.println(b+ " "+ c + " " + c);
		}

		sc.close();
	}

}


import java.util.Scanner;

public class Ichihime_and_Triangle {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();

		while(t-- > 0)
		{
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();

			System.out.println(c+ " "+ d + " " + d);
		}

		sc.close();
	}

}


import java.util.Scanner;

public class Ichihime_and_Triangle {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();

		System.out.println(a+ " "+ b + " " + c);

		sc.close();
	}

}


import java.util.Scanner;

public class Ichihime_and_Triangle {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();

		while(t-- > 0)
		{
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();

			System.out.println(a+ " "+ b + " " + c);
		}

		sc.close();
	}

}


import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner in=new Scanner(System.in);
int t,i,j,x,k,l;
t=in.nextInt();
for(i=0;i<t;i++)
{
    int a[]=new int[4];
    a[0]=in.nextInt();
    a[1]=in.nextInt();
    a[2]=in.nextInt();
    a[3]=in.nextInt();
    for(j=a[0];j<=a[1];j++)
    {
        k=a[1];l=a[2];
            if(j+k>l)
            {
                if(l+j>k){
                    System.out.println(j+" "+k+" "+l);break;}
                else
                {
                    l=(k-j)+1;
                    if(j+k<l || l>a[3])
                        continue;
                    else{
                    System.out.println(j+" "+k+" "+l);break;}
                }
            }
            else
            {
                k=(l-j)+1;
                if(j+l<k || k>a[2])
                    continue;
                else{
                    System.out.println(j+" "+k+" "+l);break;}
            }
    }
}
}
}


import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner in=new Scanner(System.in);
int t,i,j,x,k,l;
t=in.nextInt();
for(i=0;i<t;i++)
{
    int a[]=new int[4];
    a[0]=in.nextInt();
    a[1]=in.nextInt();
    a[2]=in.nextInt();
    a[3]=in.nextInt();
    x=0;k=l=0;
    for(j=a[0];j<=a[1];j++)
    {
        if(j+a[1]>a[2] || j+a[2]>a[3])
        {
            for(k=a[1];k<=a[2];k++)
            {
                if(j+k>a[2] || j+k>a[3])
                {
                    for(l=a[2];l<=a[3];l++)
                    {
                        if(j+k>l && k+l>j && l+j>k)
                        {
                        x=1;
                        System.out.println(j+" "+k+" "+l);
                        break;
                        }
                    }
                    if(x==1)
                    break;
                }
            }
            if(x==1)
            break;
        }
    }
}
}
}


import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner in=new Scanner(System.in);
int t,i,j,x,k,l;
t=in.nextInt();
for(i=0;i<t;i++)
{
    int a[]=new int[4];
    a[0]=in.nextInt();
    a[1]=in.nextInt();
    a[2]=in.nextInt();
    a[3]=in.nextInt();
    x=0;k=l=0;
    for(j=a[0];j<=a[1];j++)
    {
        if(j+a[1]>a[2] || j+a[2]>a[3])
        {
            for(k=a[1];k<=a[2];k++)
            {
                if(j+k>a[2] || j+k>a[3])
                {
                    for(l=a[2];l<=a[3];l++)
                    {
                        if(j+k>l && k+l>j && l+j>k)
                        {
                        x=1;
                        System.out.println(j+" "+k+" "+l);
                        break;
                        }
                    }
                    if(x==1)
                    break;
                }
            }
            if(x==1)
            break;
        }
    }
}
}


import java.util.Scanner;

public class ichihimeandtriangle {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);

		int t = in.nextInt();

		while (t-- > 0) {

			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			int d = in.nextInt();

			System.out.println(b + " " + c + " " + c);

		}
	}
}


import java.util.Scanner;

public class ichihimeandtriangle {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);

		int t = in.nextInt();

		while (t-- > 0) {

			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			int d = in.nextInt();

			System.out.println(a + " " + b + " " + c);

		}
	}
}


import java.util.Scanner;

public class ichihimeandtriangle {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);

		int t = in.nextInt();

		while (t-- > 0) {

			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();

			System.out.println(a + " " + b + " " + c);

		}
	}
}


import java.util.Scanner;

public class ichihimeandtriangle {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);

		int t = in.nextInt();

		while (t-- > 0) {

			int a = in.nextInt();
			int b = in.nextInt();
			int c = in.nextInt();
			int d = in.nextInt();

			System.out.println(b + " " + b + " " + c);

		}
	}
}


import java.util.*;

public class MyClass {
    public static void main(String args[]) {
      Scanner s = new Scanner(System.in);
      int t =s.nextInt();
      while(t-->0){
          long a = s.nextLong();
          long b = s.nextLong();
          long c = s.nextLong();
          long d = s.nextLong();
          long y = b+1;
          System.out.println(b+" "+c+" "+c);
      }
    }
}


import java.util.*;

public class MyClass {
    public static void main(String args[]) {
      Scanner s = new Scanner(System.in);
      int t =s.nextInt();
      while(t-->0){
          long a = s.nextLong();
          long b = s.nextLong();
          long c = s.nextLong();
          long d = s.nextLong();
          long y = b+1;
          if(b==1){
              System.out.println(1+" "+c+" "+c);
          }
          else{
              if(y>c){
                  System.out.println(b+" "+b+" "+c);
              }
              else System.out.println(b+" "+b+" "+y);
          }
      }
    }
}


import java.util.*;

public class MyClass {
    public static void main(String args[]) {
      Scanner s = new Scanner(System.in);
      int t =s.nextInt();
      while(t-->0){
          long a = s.nextLong();
          long b = s.nextLong();
          long c = s.nextLong();
          long d = s.nextLong();
          long y = c+1;
          if(y>d){
              System.out.println(b+" "+c+" "+d);
          }
          else System.out.println(b+" "+c+" "+y);

      }
    }
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int t=scan.nextInt();
		while(t-->0)
		{
		    int a=scan.nextInt();
		    int b=scan.nextInt();
		    int c=scan.nextInt();
		    int d=scan.nextInt();
		    System.out.println(a+" "+b+" "+c);
		}
	}
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int t=scan.nextInt();
		while(t-->0)
		{
		    int a=scan.nextInt();
		    int b=scan.nextInt();
		    int c=scan.nextInt();
		    int d=scan.nextInt();
		    System.out.println(b+" "+c+" "+d);
		}
	}
}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int t=scan.nextInt();
		while(t-->0)
		{
		    int a=scan.nextInt();
		    int b=scan.nextInt();
		    int c=scan.nextInt();
		    int d=scan.nextInt();
		    System.out.println(b+" "+c+" "+c);
		}
	}
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int t = Integer.parseInt(scan.nextLine());
        String[] line;
        int b, c;

        for (int i = 0; i < t; i++) {
            line = scan.nextLine().split(" ");

            b = Integer.parseInt(line[1]);
            c = Integer.parseInt(line[2]);

            System.out.println(b + " " + c + " " + c);
        }

    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int t = Integer.parseInt(scan.nextLine());
        String[] line;
        int b, c, d;

        for (int i = 0; i < t; i++) {
            line = scan.nextLine().split(" ");

            b = Integer.parseInt(line[1]);
            c = Integer.parseInt(line[2]);
            d = Integer.parseInt(line[3]);

            System.out.println(b + " " + c + " " + d);
        }

    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int t = Integer.parseInt(scan.nextLine());
        String[] line;
        int a, d;

        for (int i = 0; i < t; i++) {
            line = scan.nextLine().split(" ");

            a = Integer.parseInt(line[0]);
            d = Integer.parseInt(line[3]);

            System.out.println(a + " " + d + " " + d);
        }

    }
}


import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		for(int i=0;i<t;i++)
		{
		    int a=sc.nextInt();
		    int b=sc.nextInt();
		    int c=sc.nextInt();
		    int d=sc.nextInt();

		    if(check(a,b,c)==1)
		    {
		    System.out.print(a+" ");
		    System.out.print(b+" ");
		    System.out.print(c+" ");
		    }
		    else if(check(b,c,d)==1)
		    {
		        System.out.print(b+" ");
    		    System.out.print(c+" ");
    		    System.out.print(d+" ");
		    }

		    System.out.print("\n");
		}
	}
	public static int check(int a,int b, int c)
	{
	    if((a+b>c)&&(b+c>a)&&(a+c>b))
	        return 1;
	    return 0;
	}
}


import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		for(int i=0;i<t;i++)
		{
		    int a=sc.nextInt();
		    int b=sc.nextInt();
		    int c=sc.nextInt();
		    int d=sc.nextInt();
		    if(b+c==d)
		    {
		        System.out.print(a+" ");
		    System.out.print(c+" ");
		    System.out.print(d+" ");
		    }
		    else
		    {
		    System.out.print(b+" ");
		    System.out.print(c+" ");
		    System.out.print(d+" ");
		    }
		    System.out.print("\n");
		}
	}
}


import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		for(int i=0;i<t;i++)
		{
		    int a=sc.nextInt();
		    int b=sc.nextInt();
		    int c=sc.nextInt();
		    int d=sc.nextInt();

    		    System.out.print(b+" "+ c + " "+ c+" ");

		    System.out.print("\n");
		}
	}

}


import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t=sc.nextInt();
		for(int i=0;i<t;i++)
		{
		    int a=sc.nextInt();
		    int b=sc.nextInt();
		    int c=sc.nextInt();
		    int d=sc.nextInt();
		    System.out.print(b+" ");
		    System.out.print(c+" ");
		    System.out.print(d+" ");
		    System.out.print("\n");
		}
	}
}


import java.util.Scanner;

public class ProbOne {
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d,x,y,z;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            x = b;
            y = c;
            z = c;
            System.out.printf("%d %d %d\n",x,y,z);

            i++;
        }

        input.close();
    }

}


import java.util.Scanner;
import java.util.Random;

public class ProbOne {
    private static int x,y,z;
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            if(b == c) {
                x = y = z = b;
            }
            else if (a == b && c == d) {
                x = a;
                y = z = c;
            }
            else
                getRandom(a, b, c, d);

            while(x+y<=z || x+z<=y || y+z<=x) {
                getRandom(a, b, c, d);
            }

            System.out.printf("%d %d %d\n",x,y,z);
            i++;
        }

        input.close();
    }

    private static void getRandom(int a,int b, int c,int d) {
        Random random = new Random();
        x = a + random.nextInt(b-a+1);
        y = b + random.nextInt(c-b+1);
        z = c + random.nextInt(d-c+1);

    }

}


import java.util.Scanner;
import java.util.Random;

public class ProbOne {
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d,x,y,z;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        Random random = new Random();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            x = a + random.nextInt(b-a+1);
            y = b + random.nextInt(c-b+1);
            z = c + random.nextInt(d-c+1);

            while(x+y<=z || x+z<=y || y+z<=x) {
                z = c + random.nextInt(d-c+1);
            }

            System.out.printf("%d %d %d\n",x,y,z);
            i++;
        }

        input.close();
    }
}


import java.util.Scanner;
import java.util.Random;

public class ProbOne {
    private static int x,y,z;
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            getRandom(a, b, c, d);

            while(x+y<=z || x+z<=y || y+z<=x) {
                getRandom(a, b, c, d);
            }

            System.out.printf("%d %d %d\n",x,y,z);
            i++;
        }

        input.close();
    }

    private static void getRandom(int a,int b, int c,int d) {
        Random random = new Random();
        x = a + random.nextInt(b-a+1);
        y = b + random.nextInt(c-b+1);
        z = c + random.nextInt(d-c+1);

    }

}


import java.util.Scanner;
import java.util.Random;

public class ProbOne {
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d,x,y,z;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        Random random = new Random();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            x = a + random.nextInt(b-a+1);
            y = b + random.nextInt(c-b+1);
            z = c + random.nextInt(d-c+1);

            System.out.printf("%d %d %d\n",x,y,z);
            i++;
        }

        input.close();
    }
}


import java.util.Scanner;
import java.util.Random;

public class ProbOne {
    private static int x,y,z;
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            if(b == c || (a == b && b == c && c == d )) {
                x = y = z = b;
            }
            else if (a == b && c == d) {
                x = a;
                y = z = c;
            }
            else
                getRandom(a, b, c, d);

            while(x+y<=z || x+z<=y || y+z<=x) {
                getRandom(a, b, c, d);
            }

            System.out.printf("%d %d %d\n",x,y,z);
            i++;
        }

        input.close();
    }

    private static void getRandom(int a,int b, int c,int d) {
        Random random = new Random();
        x = a + random.nextInt(b-a+1);
        y = b + random.nextInt(c-b+1);
        z = c + random.nextInt(d-c+1);

    }

}


import java.util.Scanner;
import java.util.Random;

public class ProbOne {
    public static void main(String[] args) {
        int testCases,i=0,a,b,c,d,x,y,z;
        Scanner input = new Scanner(System.in);
        testCases = input.nextInt();

        Random random = new Random();

        while(i != testCases) {
            a = input.nextInt();
            b = input.nextInt();
            c = input.nextInt();
            d = input.nextInt();

            x = a + random.nextInt(b-a+1);
            y = b + random.nextInt(c-b+1);
            z = c + random.nextInt(d-c+1);

            while(x+y<=z || x+z<=y || y+z<=x) {
                x = a + random.nextInt(b-a+1);
                y = b + random.nextInt(c-b+1);
                z = c + random.nextInt(d-c+1);
            }

            System.out.printf("%d %d %d\n",x,y,z);
            i++;
        }

        input.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.*;

public class Main {

    public static void main (String[]args) throws IOException {
        Scanner in = new Scanner(System.in);

        try (PrintWriter or = new PrintWriter(System.out)) {

            int t=in.nextInt();
            while (t-->0) {

                int n = in.nextInt();
                int a=Math.min(in.nextInt(),n+1);
                int b=in.nextInt();
                int c=in.nextInt();
                or.println(a+" "+b+" "+b);

            }
        }
    }

    static long gcd(long a, long b)
    {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static int getlen(int r,int l,int a){
        return (r-l+1+1)/(a+1);
    }

    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}

class Pair implements Comparable<Pair> {
    int first, second;

    public Pair(int first, int second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public int compareTo(Pair o) {
        if (first!=o.first)return first-o.first;
        return second-o.second;
    }
}

class Tempo {

    int first,second,third;

    public Tempo(int first, int second, int third) {
        this.first = first;
        this.second = second;
        this.third = third;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.*;

public class Main {

    public static void main (String[]args) throws IOException {
        Scanner in = new Scanner(System.in);

        try (PrintWriter or = new PrintWriter(System.out)) {

            int t=in.nextInt();
            while (t-->0) {

                int n = in.nextInt();
                int a=Math.min(in.nextInt(),n+1);
                int b=in.nextInt();
                int c=Math.min(in.nextInt(),b+1);
                or.println(a+" "+b+" "+c);

            }
        }
    }

    static long gcd(long a, long b)
    {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static int getlen(int r,int l,int a){
        return (r-l+1+1)/(a+1);
    }

    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}

class Pair implements Comparable<Pair> {
    int first, second;

    public Pair(int first, int second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public int compareTo(Pair o) {
        if (first!=o.first)return first-o.first;
        return second-o.second;
    }
}

class Tempo {

    int first,second,third;

    public Tempo(int first, int second, int third) {
        this.first = first;
        this.second = second;
        this.third = third;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.*;

public class Main {

    public static void main (String[]args) throws IOException {
        Scanner in = new Scanner(System.in);

        try (PrintWriter or = new PrintWriter(System.out)) {

            int t=in.nextInt();
            while (t-->0) {

                int n = in.nextInt();
                or.println(in.nextInt() + " " + in.nextInt() + " " + in.nextInt());

            }
        }
    }

    static long gcd(long a, long b)
    {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static int getlen(int r,int l,int a){
        return (r-l+1+1)/(a+1);
    }

    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}

class Pair implements Comparable<Pair> {
    int first, second;

    public Pair(int first, int second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public int compareTo(Pair o) {
        if (first!=o.first)return first-o.first;
        return second-o.second;
    }
}

class Tempo {

    int first,second,third;

    public Tempo(int first, int second, int third) {
        this.first = first;
        this.second = second;
        this.third = third;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.*;

public class Main {

    public static void main (String[]args) throws IOException {
        Scanner in = new Scanner(System.in);

        try (PrintWriter or = new PrintWriter(System.out)) {

            int t=in.nextInt();
            while (t-->0) {

                int n = in.nextInt();
                int a=Math.min(in.nextInt(),n+1);
                int b=in.nextInt();
                int c=in.nextInt();
                or.println(b+" "+c+" "+c);

            }
        }
    }

    static long gcd(long a, long b)
    {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static int getlen(int r,int l,int a){
        return (r-l+1+1)/(a+1);
    }

    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}

class Pair implements Comparable<Pair> {
    int first, second;

    public Pair(int first, int second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public int compareTo(Pair o) {
        if (first!=o.first)return first-o.first;
        return second-o.second;
    }
}

class Tempo {

    int first,second,third;

    public Tempo(int first, int second, int third) {
        this.first = first;
        this.second = second;
        this.third = third;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.*;

public class Main {

    public static void main (String[]args) throws IOException {
        Scanner in = new Scanner(System.in);

        try (PrintWriter or = new PrintWriter(System.out)) {

            int t=in.nextInt();
            while (t-->0) {

                int n = in.nextInt();
                int a=in.nextInt();
                int b=in.nextInt();
                int c=Math.min(in.nextInt(),b+1);
                or.println(a+" "+b+" "+c);

            }
        }
    }

    static long gcd(long a, long b)
    {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    static int getlen(int r,int l,int a){
        return (r-l+1+1)/(a+1);
    }

    static class Scanner {

        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++) {
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec) {
                        f *= 10;
                    }
                }
            }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}

class Pair implements Comparable<Pair> {
    int first, second;

    public Pair(int first, int second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public int compareTo(Pair o) {
        if (first!=o.first)return first-o.first;
        return second-o.second;
    }
}

class Tempo {

    int first,second,third;

    public Tempo(int first, int second, int third) {
        this.first = first;
        this.second = second;
        this.third = third;
    }
}


import java.io.*;
import java.util.*;
import java.lang.*;
public class IchihimeAndTriangles
{
    public static void main(String args[])throws IOException
    {
        DataInputStream in=new DataInputStream(System.in);
        int t=Integer.parseInt(in.readLine());
        for(int i=0;i<t;i++)
        {
            String x[]=in.readLine().split(" ");
            int a=Integer.parseInt(x[0]);
            int b=Integer.parseInt(x[1]);
            int c=Integer.parseInt(x[2]);
            int d=Integer.parseInt(x[3]);
            if(a==b && b==c && c==d)
            {
                System.out.print(a+" "+a+" "+a);

            }
            else if(a==b && b==c)
            {
                System.out.print(a+" "+a+" "+a);
            }
            else if(a==b && c==d)
            {
                System.out.print(a+" "+c+" "+c);
            }
            else if(b==c)
            {
                System.out.print(b+" "+b+" "+b);
            }
            else if(c==d)
            {
                System.out.print(b+" "+c+" "+c);
            }
            else if(a+1==b && b+1==c && c+1==d)
            {
                System.out.print(b+" "+c+" "+d);
            }
            else
            {
                System.out.print(b+" "+(c-1)+" "+(d-1));
            }
            System.out.println();
        }
    }
}