// 463A     Caisa и сахар

// var n = parseInt(readline());

var input_line = readline().split(' ').map(Number);

var n = input_line[0];
var s = input_line[1];
var arr = [];

var count;
var flagBuy = false;
var max = 0;

for (var i = 0; i < n; i++) {
    arr = readline().split(' ').map(Number);

    if (((arr[0] * 100) + arr[1]) <= (s * 100)) {
        flagBuy = true;
        if ((max < (100 - arr[1])) && (arr[1] != 0)) max = 100 - arr[1];
    };
};

if (flagBuy) {
    count = max;
} else {
    count = -1;
};

print(count);

var toInt = i => parseInt( i, 10 );
var input = readline().split( " " ).map( toInt ),
    s = input[ 1 ],
    centsInDollar = 100,
    count = -1;
while( input = readline() ) {
  input = input.split( " " ).map( toInt );
  var dollars = input[ 0 ],
      cents = input[ 1 ];
  if ( dollars + Math.ceil( cents / centsInDollar ) <= s ) {
    count = Math.max( (centsInDollar - cents) % centsInDollar, count );
  }
}
print( count );

var input = readline().split(" "), n = +input[0], s = +input[1] * 100;
var max = 0, check = false;

for(var i = 0; i < n; i++){
	input = readline().split(" ").map(Number);
	input = input[0] * 100 + input[1];

	if(s >= input){
		max = Math.max(max, ((s - input) % 100));
		check = true;
	}
}

if(check){write(max)}
else{write(-1)}

 var vector = readline().split(' ').map(Number);
    var n = vector[0];
    var s = vector[1];
    var max = -1;
    for (var i = 0; i < n; i++)
    {
        var vector2 = readline().split(' ').map(Number);
        var dolar = vector2[0];
        var centavos = vector2[1];
        if (dolar + centavos / 100.0 <= s){
            max = Math.max(max, (100 - centavos) % 100);
        }
    }
    print(max);

 var vector = readline().split(' ').map(Number);
    var n = vector[0];
    var s = vector[1];
    var max = -1;
    for (var i = 0; i < n; i++)
    {
        var vector2 = readline().split(' ').map(Number);
        var dolar = vector2[0];
        var centavos = vector2[1];
        if (dolar + centavos / 100.0 <= s)
            max = Math.max(max, (100 - centavos) % 100);
    }
    print(max);

;(function () {
    var n, s, l, ans = -1;
    l = readline().split(' ').map(Number);
    n = l[0];
    s = l[1] * 100;

    while (n--) {
        var q, w;
        l = readline().split(' ').map(Number);
        q = l[0] * 100 + l[1];
        w = (100 - l[1]) % 100;

        if (s >= q) {
            ans = Math.max(ans, w);
        }
    }

    print(ans);

}.call(this));

var input = readline().split(" "), n = +input[0], s = +input[1] * 100;
var max = 0;

for(var i = 0; i < n; i++){
	input = readline().split(" ").map(Number);
	input = input[0] * 100 + input[1];

	if(s >= input){
		max = Math.max(max, ((s - input) % 100));
	}
}

write(max);

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}

			k = k.map(function (e) {
				if (e > s) return 0;
				e = 100 - parseInt(e.toString().slice(-2));
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t].concat(k));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}

			k = k.map(function (e) {
				if (e > s || e === 0) return 0;
				e = 100 - parseInt(e.toString().slice(-2));
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t || 0].concat(k.length ? k : [0]));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}
			k.splice(0, 1);

			if (k.slice(-1) > s) {
				k.splice(-1);
			}

			k = k.map(function (e) {
				e = 100 - +e.toString().slice(-2);
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t].concat(k));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			var k = l;
			while (k <= s) {
				var r = 100 - (k % 100);
				r = r === 100 ? 0 : r;
				t = (t === null || t < r) ? r : t;
				k += l;
			}
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}
			k.splice(-1); k.splice(0, 1);

			k = k.map(function (e) {
				e = 100 - +e.toString().slice(-2);
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t].concat(k));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l, q = [];
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			var k = l;
			while (k <= s) {
				var r = 100 - (k % 100);
				r = r === 100 ? 0 : r;
				t = (t === null || t < r) ? r : t;
				k += l;

				if (t === 99) q.push(l);
			}
		}

		if (t === 99) return q;
		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}

			k = k.map(function (e) {
				if (e > s || e === 0) return 0;
				e = 100 - parseInt(e.toString().slice(-2));
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t].concat(k));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		var r = 0;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}

			k = k.map(function (e) {
				if (e > s) return 0;
				e = 100 - parseInt(e.toString().slice(-2));
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t].concat(k));
			if (t === 99) r = l;
		}
		if (t === 99) return r;
		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;
			if ((l%100) === 0) {
				t = Math.max.apply(null, [t || 0].concat(0));
				continue;
			}

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}

			k = k.map(function (e) {
				if (e > s || e === 0) return 0;
				e = 100 - parseInt(e.toString().slice(-2));
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t || 0].concat(k.length ? k : [0]));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l, q = [];
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			var k = l;
			while (k <= s) {
				var r = 100 - (k % 100);
				r = r === 100 ? 0 : r;
				t = (t === null || t < r) ? r : t;
				k += l;

				if (t === 99 && q.indexOf(l) === -1) q.push(l);
			}
		}

		if (t === 99) return q;
		return t === null ? -1 : t;
	}());
}.call(this));

;(function () {
	print(function () {
		var n, s, l;
		l = readline().split(' ').map(Number);
		n = l[0];
		s = l[1] * 100;

		var t = null;
		while (n--) {
			l = readline().split(' ').map(Number);
			l = l[0] * 100 + l[1];

			if (l > s) continue;
			if ((l % 100) === 0) return 0;

			var k = [0];
			while (k.slice(-1)[0] <= s) {
				k.push(k.slice(-1)[0] + l);
			}

			k = k.map(function (e) {
				if (e > s) return 0;
				e = 100 - parseInt(e.toString().slice(-2));
				return e !== 100 ? e : 0;
			});

			t = Math.max.apply(null, [t].concat(k));
		}

		return t === null ? -1 : t;
	}());
}.call(this));

// 463A     Caisa и сахар

// var n = parseInt(readline());

var input_line = readline().split(' ').map(Number);

var n = input_line[0];
var s = input_line[1];
var arr = [];

var count;
var flagBuy = false;
var max = 0;

for (var i = 0; i < n; i++) {
    arr = readline().split(' ').map(Number);

    if (((arr[0] * 100) + arr[1]) <= (s * 100)) {
        flagBuy = true;
        if (max < arr[1]) max = arr[1];
    };
};

if (flagBuy) {
    count = max;
} else {
    count = -1;
};

print(count);

var toInt = i => parseInt( i, 10 );
var input = readline().split( " " ).map( toInt ),
    s = input[ 1 ],
    count = -1;
while( input = readline() ) {
  input = input.split( " " ).map( toInt );
  var dollars = input[ 0 ],
      cents = input[ 1 ];
  if ( dollars < s && cents > 0 ) {
    count = Math.max( 100 - cents, count );
  }
}
print( count );


/* KEEP BELOW CODE AS IT IS */
// copy-pasted from: https://codeforces.com/blog/entry/78878?f0a28=1
/**
 * This code has been taken from: https://codeforces.com/blog/entry/69610
 * I am not the owner of the readLine function below, understanding them require knowledge of basic NodeJS I/O and streams
 */
process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function nextLine() {
    return inputString[currentLine++];
}

function nextInt() {
    return parseInt(nextLine());
}

function nextFloat() {
    return parseFloat(nextLine());
}

/** BELOW HERE START WRITING YOUR CODE IN main() FUNCTION */
function main() {

    function solve(words, set, additional) {
        for (const word of words) {
            const len = word.length;
            const reversed = word.split("").reverse().join("")
            if (word[0] === word[len - 1] || set[reversed] !== undefined) {
                return "YES";
            }
            set[word] = true;
            if (len === 2) {
                if (additional[reversed] !== undefined) {
                    return "YES";
                }
                continue;
            }

            const last = reversed.substring(0, 2)
            if (set[last] !== undefined) {
                return "YES";
            }
            additional[word.substring(0, 2)] = true;
        }
        return "NO";
    }

    let amount = nextInt();

    while (amount--) {
        const wordAmount = nextInt();
        const words = [];
        for (let i = 0; i < wordAmount; i++) {
            words.push(nextLine());
        }
        console.log(solve(words, {}, {}));
    }
}

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
rl.on('line', (line) => {
    lines.push(line.trim());

}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let set2 = new Set();
        let set3 = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]) {
                wasInterrupted = true;
                break;
            }

            if (scene.length === 2 && (set2.has([...scene].reverse().join('')))) {
                wasInterrupted = true;
                break;
            }

            if (scene.length === 3
                && (set3.has([...scene.slice(1)].reverse().join(''))
                    || set3.has([...scene].reverse().join('')))) {
                wasInterrupted = true;
                break;
            }

            if (scene.length === 2) {
                set2.add(scene);
                set3.add(scene);
            }

            if (scene.length === 3) {
                set3.add(scene);
                set2.add(scene.slice(0, scene.length - 1))
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let counter = 0;
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());
    if (line.trim() === "uev") {
        print = true;
    }
    if (print) {
        process.stdout.write(line + " ");
        counter++;
        if (counter === 10) {
            process.stdout.write("\n");
            counter = 0;
        }
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let counter = 0;
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());
    if (line.trim() === "iyq") {
        print = true;
    }
    if (print) {
        process.stdout.write(line + " ");
        counter++;
        if (counter === 10) {
            process.stdout.write("\n");
            counter = 0;
        }
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let counter = 0;
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());

    if (Number(line.trim()) && print) {
        printTrue = true;
    }
    if (line.trim() === "1") {
        print = true;
    }
    if (printTrue) {
        process.stdout.write(line + " ");
        counter++;
        if (counter === 10) {
            process.stdout.write("\n");
            counter = 0;
        }
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let counter = 0;
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());

    if (Number(line.trim()) && print) {
        printTrue = true;
    }
    if (line.trim() === "118") {
        print = true;
    }
    if (printTrue) {
        process.stdout.write(line + " ");
        counter++;
        if (counter === 10) {
            process.stdout.write("\n");
            counter = 0;
        }
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());

    if (Number(line.trim()) && print) {
        printTrue = true;
    }
    if (line.trim() === "118") {
        print = true;
    }
    if (printTrue) {
        process.stdout.write(line + " ");
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());

    if (Number(line.trim()) && print) {
        printTrue = true;
    }
    if (line.trim() === "230") {
        print = true;
    }
    if (printTrue) {
        process.stdout.write(line + "\n");
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let print = false;
let printTrue = false;
rl.on('line', (line) => {
    lines.push(line.trim());

    if (Number(line.trim()) && print) {
        printTrue = true;
    }
    if (line.trim() === "100") {
        print = true;
    }
    if (printTrue) {
        process.stdout.write(line + "\n");
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let print = false;
rl.on('line', (line) => {
    lines.push(line.trim());
    if (line.trim() === "100") {
        print = true;
    }
    if (print) {
        process.stdout.write(line + "\n");
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
let print = false;
rl.on('line', (line) => {
    lines.push(line.trim());
    if (line.trim() === "100") {
        print = true;
    }
    if (print) {
        process.stdout.write(line);
    }
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
const print = false;
rl.on('line', (line) => {
    lines.push(line.trim());
    if (line.trim() === "100")
        process.stdout.write(line);
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
const print = false;
rl.on('line', (line) => {
    lines.push(line.trim());
    if (line.trim() === "100\n")
        process.stdout.write(line);
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
rl.on('line', (line) => {
    lines.push(line.trim());
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || scene.length > 2 && duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
rl.on('line', (line) => {
    lines.push(line.trim());
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]
                || duplicates.has([...scene].reverse().join(''))
                || duplicates.has([...scene.slice(1)].reverse().join(''))) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(0, scene.length - 1));
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
});
const lines = [];
rl.on('line', (line) => {
    lines.push(line.trim());
}).on('close', () => {
    const t = Number(lines[0]);
    let prevN = 1;

    for (let i = 0; i < t; i++) {
        let wasInterrupted = false;
        const n = Number(lines[i + prevN]);
        let duplicates = new Set();
        for (let j = 0; j < n; j++) {
            const scene = lines[j + prevN + i + 1]
            if (scene[0] === scene[scene.length - 1]) {
                wasInterrupted = true;
                break;
            }
            duplicates.add(scene);
            if (scene.length > 2) {
                duplicates.add(scene.slice(1));
            }
        }
        if (!wasInterrupted) {
            for (let scene of duplicates.values()) {
                if (duplicates.has([...scene].reverse().join(''))) {
                    wasInterrupted = true;
                    break;
                }
            }
        }
        prevN += n;
        if (wasInterrupted) {
            process.stdout.write('YES\n');
        } else {
            process.stdout.write('NO\n');
        }
    }
});


var inpStr = readline();
inpStr = inpStr.substr(5);
var suffixes = [], visited = [];
function getSuffixes(str, lastSuffix){
    if(str.length < 2 || (visited[str.length] && visited[str.length][lastSuffix])){
        return;
    }
    if(!visited[str.length]){
        visited[str.length] = [];
    }
    visited[str.length][lastSuffix] = true;
    if(str.length === 2){
        if(lastSuffix !== str){
            if(suffixes.indexOf(str) === -1){
                suffixes.push(str);
            }
        }
        return;
    } else {
        var strLen2 = str.substr(-2);
        if(lastSuffix !== strLen2){
            if(suffixes.indexOf(strLen2) === -1){
                suffixes.push(strLen2);
            }
            getSuffixes(str.substring(0, str.length-2), strLen2);
        }

        var strLen3 = str.substr(-3);
        if(lastSuffix !== strLen3){
            if(suffixes.indexOf(strLen3) === -1){
                suffixes.push(strLen3);
            }
            getSuffixes(str.substring(0, str.length-3), strLen3);
        }
    }
}
getSuffixes(inpStr, "");
print(suffixes.length);
suffixes.sort().forEach(function(suffix){
    print(suffix);
})

const memo = {};
const res = {};

function resolve(s, prev) {
  if (!memo[s + ' ' + prev]) {
    memo[s + ' ' + prev] = true;
    var suffix2 = s.slice(s.length - 2);
    if (suffix2 !== prev && s.length > 6) {
      res[suffix2] = true;
      resolve(s.slice(0, s.length - 2), suffix2);
    }
    var suffix3 = s.slice(s.length - 3);
    if (suffix3 !== prev && s.length > 7) {
      res[suffix3] = true;
      resolve(s.slice(0, s.length - 3), suffix3);
    }
  }
}

/*
resolve('abcdeabzzzzzzzz', null);
console.log(res);
*/

var s = readline();

resolve(s, null);

var suffixes = Object.keys(res).sort();

print(suffixes.length);

for (var i = 0; i < suffixes.length; i++) {
  print(suffixes[i]);
}

const memo = {};
const res = {};

function resolve(s, prev) {
  if (!memo[s]) {
    memo[s] = true;
    var suffix2 = s.slice(s.length - 2);
    if (suffix2 !== prev && s.length > 6) {
      res[suffix2] = true;
      resolve(s.slice(0, s.length - 2), suffix2);
    }
    var suffix3 = s.slice(s.length - 3);
    if (suffix3 !== prev && s.length > 7) {
      res[suffix3] = true;
      resolve(s.slice(0, s.length - 3), suffix3);
    }
  }
}

var s = readline();

resolve(s, null);

var suffixes = Object.keys(res).sort();

print(suffixes.length + '\n');

for (var i = 0; i < suffixes.length; i++) {
  print(suffixes[i]);
}

var inpStr = readline();
inpStr = inpStr.substr(5);
var suffixes = [];
function getSuffixes(str){
    if(str.length < 2){
        return;
    } else if(str.length === 2){
        if(suffixes.indexOf(str) === -1){
            suffixes.push(str);
        }
        return;
    } else {
        var strLen2 = str.substr(-2);
        if(suffixes.indexOf(strLen2) === -1){
            suffixes.push(strLen2);
        }
        getSuffixes(str.substring(0, str.length-2));

        var strLen3 = str.substr(-3);
        if(suffixes.indexOf(strLen3) === -1){
            suffixes.push(strLen3);
        }
        getSuffixes(str.substring(0, str.length-3));
    }
}
getSuffixes(inpStr);
print(suffixes.length)
suffixes.sort().forEach(function(suffix){
    print(suffix);
})

var inpStr = readline();
inpStr = inpStr.substr(5);
var suffixes = [], visited = [];
function getSuffixes(str, lastSuffix){
    if(str.length < 2 || visited[str.length]){
        return;
    }
    visited[str.length] = true;
    if(str.length === 2){
        if(lastSuffix !== str){
            if(suffixes.indexOf(str) === -1){
                suffixes.push(str);
            }
        }
        return;
    } else {
        var strLen2 = str.substr(-2);
        if(lastSuffix !== strLen2){
            if(suffixes.indexOf(strLen2) === -1){
                suffixes.push(strLen2);
            }
            getSuffixes(str.substring(0, str.length-2), strLen2);
        }

        var strLen3 = str.substr(-3);
        if(lastSuffix !== strLen3){
            if(suffixes.indexOf(strLen3) === -1){
                suffixes.push(strLen3);
            }
            getSuffixes(str.substring(0, str.length-3), strLen3);
        }
    }
}
getSuffixes(inpStr, "");
print(suffixes.length);
suffixes.sort().forEach(function(suffix){
    print(suffix);
})


"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var j = parseInt(readline());
    var x4 = true;
    for (var _ = 0; _ < j; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

const readline = require('readline');
let inputs = [];
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
rl.on('line', lineInput => {
    inputs.push(lineInput);
});

rl.on('close', () => {
	const test = parseInt(inputs[0]);
	let n = [];
	for (let t = 0; t < test; t++) {
		n = inputs[t+1].split(' ').map((a) => {return parseInt(a)});
    	console.log(solution(n));
	}
});

function solution(n) {
	let i = 0, j = 0, k = 0;
	let a = n[0], b = n[1], c = n[2], d = n[3];
	return `${b} ${c} ${c}`
}

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}
// Make a Snippet for the code above this and then write your logic in main();

function main() {
    const cases = readline();
    var i;
    for (i = 0; i < cases; i++) {
        const line = readline();
        var a = parseInt(line.split(" ")[0]);
        var b = parseInt(line.split(" ")[1]);
        var c = parseInt(line.split(" ")[2]);
        var d = parseInt(line.split(" ")[3]);

        solve(a, b, c, d);
    }
}

function solve(a, b, c, d) {
    console.log (b + " " + c + " " + c);
}

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let count = 0;

rl.on('line', (data) => {
  if (count === 0) {
    count++;
    return;
  }

  const [a, b, c, d] = data.split(' ').map(Number);
  console.log(b, c, c);

  count++;
});

const processData = (input) => {
    let exp = /\s+/;
    let arr = input.split(exp);
    let l = arr[0];
    arr = arr.slice(1);
    arr = arr.map(el => +el);
    for (let z = 0; z < l; z ++){
        a = arr[0];
        c = arr[2];
        console.log(`${a} ${c} ${c}`)
        arr = arr.slice(4);
    }
}

process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
    _input += input;
});

process.stdin.on("end", function () {
    processData(_input);
});

"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    var x2 = true;
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    var x4 = true;
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    var x3 = true;
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    var x = true;
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

"use strict";
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    var x5 = true;
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(' ').map(function (e) { return parseInt(e); }), a = _a[0], b = _a[1], c = _a[2], d = _a[3];
        print(b, c, c);
    }
}

const processData = (lines) => {
  const n = +lines[0]
  for (let i=0; i<n; i++) {
    const [a, b, c, d] = lines[i+1].split(' ').map(x => +x)
    console.log(b, c, c)
  }
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})

var range = readline();

for(var i=0;i<range;i++) {
    var inputs = readline().split(" ").map((x) => parseInt(x));
    var firstSet = inputs[0];
    var secondSet = inputs[1];
    var thirdSet = inputs[2];
    var fourthSet = inputs[3];

    var oneSide = 1;
    var secondSide = 1;
    var thirdSide = 1;

    oneSide = Math.min(firstSet, secondSet);
    secondSide = Math.max(secondSet, thirdSet);
    thirdSide = Math.min(thirdSet, fourthSet);

    while(oneSide <= secondSide && secondSide <= thirdSide) {
        if(oneSide + secondSide > thirdSide && thirdSide + oneSide > secondSide && secondSide + thirdSide > oneSide) {
            print(oneSide, secondSide, thirdSide);
            break;
        } else {
            oneSide++;
            secondSide--;
            thirdSide++;
        }
    }
}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

/**
 *
 * @param {*} str
 * @param {*} seperator
 */
function splitter(str, seperator = '') {
    return str.trim().split(seperator);
}

/**
 *
 * @param {*} arr
 */
function strToNumArr(arr = []) {
    return arr.map(num => Number(num));
}

/**
 *
 * @param {*} num1
 * @param {*} num2
 */
function matrixArray(num1, num2) {
    return Array(num1).fill(Array(num2));
}

let log = function () {
    return Function.prototype.bind.call(console.log, console, '');
}();

function removeEmptyItem(arr, index) {
    return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));
}

function range(min, max) {

    let arr = [];
    for (let index = min; index < max; index++) {
        arr.push(index);

    }
    return arr;
}

function main(input) {
    let output = nameLookUp(input);
    //process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {

    let inputs = str.trim().split('\n');
    let t = +inputs[0].trim();

    for (let index = 1; index <= t; index++) {
        const element = strToNumArr(inputs[index].trim().split(' '));
        let str = '';
        for (let index2 = 1; index2 <= element.length; index2++) {
            if (index2 - 1 == 2) {
                str += element[index2 - 1] + ' ';
            }
            else if (element[index2 - 1] <= element[index2]) {
                str += element[index2] + ' ';
            }
        }
        console.log(str.trim());
    }
}

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}
// Make a Snippet for the code above this and then write your logic in main();

function checkValidity(a, b, c) {
  if ((a + b <= c) || (a + c <= b) || (b + c <= a)) {
    return false;
  } else {
    return true;
  }
}

function main() {
  let X = parseInt(readline());
  for (var cases = 0; cases < X; cases++) {
    const [a,b,c,d] = readline().split(" ").map(e => parseInt(e));

    //console.log(a,b,c,d);
    //console.log(checkValidity(b,c, c));
    console.log(b,c,c);

     //console.log(c-b);
  }
}

var testcase=parseInt(readline());
while(testcase--){
    var x=readline().split(' ').map(x=>parseInt(x));
    var a=x[0];
    var b=x[1];
    var c=x[2];
    print(b,c,c);
}

for(var t=Number(readline());t;t--){
 var a = readline().trim().split(/\s/).map(x=>Number(x));
 print("" + a[1] + " " + a[2] + " " + a[2]);
}

Main();
function myout(t){print(t);}//standard output
function next(){return readline();}
function nextInt(){return myconv(next(),1);}
function nextStrArray(){return myconv(next(),2);}//半角スペース分割
function nextIntArray(){return myconv(next(),4);}//半角スペース + 数値化
function nextCharArray(){return myconv(next(),6);}//1文字分割
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す
//6:1文字に分割  7:1文字に分割し、数値配列へ
//8:半角SPで結合　9:改行で結合　0:文字なしで結合
//atcoderのサンプルは最後に改行入れること
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main() {
    var t = nextInt();
	var output = new Array(t);
	for(var i = 0; i < t; i++){
		var tmp = nextIntArray();
		var a = tmp[0];
		var b = tmp[1];
		var c = tmp[2];
		var d = tmp[3];
		var center = Math.floor((b + c) / 2);
		output[i] = b + " " + c + " " + c;
	}
	myout(myconv(output,9));
}

var T = parseInt(readline());
while (T--) {
    var input1 = readline().split(' ').map(x => parseInt(x));
    var a = input1[0]
    var b = input1[1]
    var c = input1[2]
    print(a, c, c)
}

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}
// Make a Snippet for the code above this and then write your logic in main();

function main() {
    const cases = readline();
    var i;
    for (i = 0; i < cases; i++) {
        const line = readline();
        var a = parseInt(line.split(" ")[0]);
        var b = parseInt(line.split(" ")[1]);
        var c = parseInt(line.split(" ")[2]);
        var d = parseInt(line.split(" ")[3]);

        solve(a, b, c, d);
    }
}

function solve(a, b, c, d) {
    console.log (b + " " + c + " " + d);
}

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  const arr = d.split(' ');
  arr.pop();
  console.log(arr.join(' '));

  c++;
});

const processData = (input) => {
    let exp = /\s+/;
    let arr = input.split(exp);
    let l = arr[0];
    arr = arr.slice(1);
    arr = arr.map(el => +el);
    for (let z = 0; z < l; z ++){
        a = arr[0];
        d = arr[3];
        console.log(`${a} ${d} ${d}`)
        arr = arr.slice(4);
    }
}

process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
    _input += input;
});

process.stdin.on("end", function () {
    processData(_input);
});

const processData = (lines) => {
  const n = +lines[0]
  for (let i=0; i<n; i++) {
    const [a, b, c, d] = lines[i+1].split(' ').map(x => +x)
    console.log(b, c, d)
  }
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

/**
 *
 * @param {*} str
 * @param {*} seperator
 */
function splitter(str, seperator = '') {
    return str.trim().split(seperator);
}

/**
 *
 * @param {*} arr
 */
function strToNumArr(arr = []) {
    return arr.map(num => Number(num));
}

/**
 *
 * @param {*} num1
 * @param {*} num2
 */
function matrixArray(num1, num2) {
    return Array(num1).fill(Array(num2));
}

let log = function () {
    return Function.prototype.bind.call(console.log, console, '');
}();

function removeEmptyItem(arr, index) {
    return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));
}

function range(min, max) {

    let arr = [];
    for (let index = min; index < max; index++) {
        arr.push(index);

    }
    return arr;
}

function main(input) {
    let output = nameLookUp(input);
    //process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {

    let inputs = str.trim().split('\n');
    let t = +inputs[0].trim();

    for (let index = 1; index <= t; index++) {
        const element = strToNumArr(inputs[index].trim().split(' '));
        let str = '';
        for (let index2 = 1; index2 <= element.length; index2++) {

            if (element[index2 - 1] <= element[index2]) {
                str += element[index2 - 1] + ' ';
            }
        }
        console.log(str.trim());
    }
}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

/**
 *
 * @param {*} str
 * @param {*} seperator
 */
function splitter(str, seperator = '') {
    return str.trim().split(seperator);
}

/**
 *
 * @param {*} arr
 */
function strToNumArr(arr = []) {
    return arr.map(num => Number(num));
}

/**
 *
 * @param {*} num1
 * @param {*} num2
 */
function matrixArray(num1, num2) {
    return Array(num1).fill(Array(num2));
}

let log = function () {
    return Function.prototype.bind.call(console.log, console, '');
}();

function removeEmptyItem(arr, index) {
    return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));
}

function range(min, max) {

    let arr = [];
    for (let index = min; index < max; index++) {
        arr.push(index);

    }
    return arr;
}

function main(input) {
    let output = nameLookUp(input);
    //process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {

    let inputs = str.trim().split('\n');
    let t = +inputs[0].trim();

    for (let index = 1; index <= t; index++) {
        const element = strToNumArr(inputs[index].trim().split(' '));
        let str = '';
        for (let index2 = 1; index2 <= element.length; index2++) {
            if (element[index2 - 1] <= element[index2]) {
                str += element[index2] + ' ';
            }
        }
        console.log(str.trim());
    }
}

var T = parseInt(readline());
while (T--) {
    var input1 = readline().split(' ').map(x => parseInt(x));
    input1.sort((x, y) => x - y)
    input1.splice(0, 1)
    print(input1.join(" "))
}

var T = parseInt(readline());
while (T--) {
    var input1 = readline().split(' ').map(x => parseInt(x));
    var a = input1[0]
    var b = input1[1]
    var c = input1[2]
    print(a, b, c)
}

var range = readline();

for(var i=0;i<range;i++) {
    var inputs = readline().split(" ").map((x) => parseInt(x));
    var firstSet = inputs[0];
    var secondSet = inputs[1];
    var thirdSet = inputs[2];
    var fourthSet = inputs[3];
    var secondSide = inputs[1];

    var oneSide = Math.floor((secondSet + thirdSet) / 2);
    if(oneSide < secondSet) {
        secondSide = Math.floor((firstSet + oneSide) / 2);
    }
    var thirdSide = Math.floor((secondSide + fourthSet) / 2);

    while(oneSide + secondSide < thirdSide) {
        secondSide ++;
        oneSide++;
    }

    while(thirdSide + secondSide < oneSide) {
        thirdSide ++;
        secondSide++;
    }

    print(secondSide, oneSide, thirdSide);

}

var range = readline();

for(var i=0;i<range;i++) {
    var inputs = readline().split(" ").map((x) => parseInt(x));
    var firstSet = inputs[0];
    var secondSet = inputs[1];
    var thirdSet = inputs[2];
    var fourthSet = inputs[3];

    var secondSide = inputs[1];

    var oneSide = Math.floor((secondSet + thirdSet) / 2);
    if(oneSide < secondSet) {
        secondSide = Math.floor((firstSet + oneSide) / 2);
    }
    var thirdSide = Math.floor((secondSide + fourthSet) / 2);

        while(oneSide + secondSide < thirdSide) {
        secondSide ++;
        oneSide++;
    }

    while(thirdSide + secondSide < oneSide) {
        thirdSide ++;
        secondSide++;
    }

    if(fourthSet === thirdSet) {
        thirdSide = thirdSet;
    }

    if(secondSet === thirdSet) {
        oneSide = thirdSet;
    }

    if(firstSet === secondSet) {
        secondSide = firstSet;
    }

    print(secondSide, oneSide, thirdSide);

}


parameters = readline().split(" ").map(Number)
lines = []

xStart = parameters[1] - 1
xEnd = 0

yStart = parameters[0] - 1
yEnd = 0

for (row = 0; row < parameters[0]; row++) {
    lines[row] = readline()
    for (col = 0; col < parameters[1]; col++) {
        if (lines[row][col] == "*") {
            if (col < xStart) xStart = col
            if (col > xEnd) xEnd = col
            if (row < yStart) yStart = row
            if (row > yEnd) yEnd = row
        }
    }
}

for (row = yStart; row < yEnd + 1; row++) {
    ans = ''
    for (col = xStart; col < xEnd + 1; col++) {
        ans += lines[row][col]
    }
    print(ans)
}

const readline = require('readline');

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

var top = -1, bottom, left = 50, right = 0, rows, collumns, indicator = 0, cont = [], ri = 0;
rl.on('line', (input) => {
    if (indicator == 0) {
        let temp = input.split(' ').map(item => parseInt(item));
        rows = temp[0];
        collumns = temp[1];
        indicator++;
    }
    else {
        let fIndex = input.indexOf('*');
        if (fIndex != -1) {
            if (top == -1)
                top = ri;
            if (left > fIndex)
                left = fIndex;
            let lIndex = input.lastIndexOf('*');
            if (right < lIndex)
                right = lIndex;
            bottom = ri;

        }
        /** */
         // console.log("inside else input = %s ",input);
        /** */
        cont.push(input);

        ri++;// increase row index
    }
}).on('close', () => {
    //
    //console.log("top = %d  bottom = %d  left = %d  right = %d",top,bottom,left,right);
    //
    for (let i = top; i <= bottom; i++)
       console.log(cont[i].substring(left, right + 1));
       //console.log(cont[i]);
});

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
const arr = [];

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  arr.push(d.split(''));

  c++;
});

rl.on('close', () => {
  let minX = Infinity;
  let maxX = -Infinity;
  let minY = Infinity;
  let maxY = -Infinity;

  for (let i = 0; i < arr.length; i++) {
    for (let j = 0; j < arr[i].length; j++) {
      if (arr[i][j] === '*') {
        minX = Math.min(minX, j);
        maxX = Math.max(maxX, j);
        minY = Math.min(minY, i);
        maxY = Math.max(maxY, i);
      }
    }
  }

  let ans = '';

  for (let i = minY; i <= maxY; i++) {
    for (let j = minX; j <= maxX; j++) {
      ans += arr[i][j];
    }

    ans += '\n';
  }

  console.log(ans);
});

const readline = require("readline");

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

var array = [];
var n = -1;
var left = 50;
var top = 50;
var right = 0;
var down = 0;
var check = true;
rl.on("line", input => {
  if (n == -1) {
    n++;
  } else {
    array.push(input);

    for (var i = 0; i < input.length; i++) {
      if (input[i] == "*") {
        if (check) {
          top = n;
          check = false;
        }
        if (i < left) {
          left = i;
        }

        if (i > right) {
          right = i;
        }
        down = n;
      }
    }
    n++;
  }
}).on("close", () => {
  for (var i = top; i <= down; i++) {
    console.log(array[i].substr(left, right - left + 1));
  }
});

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i]);
	};
	return tokens;
}

function main() {
	var integers = tokenizeIntegers(readline());
	var rowNum = integers[0], colNum = integers[1];

	var grid = [];
	var rowDirty = new Array(rowNum), colDirty = new Array(colNum);
	for (var r = 0; r < rowNum; r += 1) {
		grid.push(trim(readline()));
		for (var c = 0; c < colNum; c += 1) {
			if (grid[r][c] == '*') {
				rowDirty[r] = true;
				colDirty[c] = true;
			}
		}
	}

	var rStart = 0, rEnd = rowNum-1;
	while (rowDirty[rStart] !== true) {
		rStart += 1;
	}
	while (rowDirty[rEnd] !== true) {
		rEnd -= 1;
	}

	var cStart = 0, cEnd = colNum-1;
	while (colDirty[cStart] !== true) {
		cStart += 1;
	}
	while (colDirty[cEnd] !== true) {
		cEnd -= 1;
	}

	for (var r = rStart; r <= rEnd; r += 1) {
		print(grid[r].substring(cStart, cEnd+1));
	}

}

main();

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i]);
	};
	return tokens;
}

function main() {
	var integers = tokenizeIntegers(readline());
	var rowNum = integers[0], colNum = integers[1];

	var rStart = rowNum-1, rEnd = 0;
	var cStart = colNum-1, cEnd = 0;
	var grid = [];

	for (var r = 0; r < rowNum; r += 1) {
		grid.push(trim(readline()));
		for (var c = 0; c < colNum; c += 1) {
			if (grid[r][c] == '*') {
				if (r < rStart) {
					rStart = r;
				}
				if (r > rEnd) {
					rEnd = r;
				}
				if (c < cStart) {
					cStart = c;
				}
				if (c > cEnd) {
					cEnd = c;
				}
			}
		}
	}

	for (var r = rStart; r <= rEnd; r += 1) {
		print(grid[r].substring(cStart, cEnd+1));
	}

}

main();

'use strict'

let lll = readline().split(' ')
const N = lll[0]
const M = lll[1]

let l = 0
let r = 0
let t = 0
let b = 0

let pct = []

while (lll = readline()) pct.push(lll.split(''))

while (t < N && !~pct[t].indexOf('*')) t++
while (b < N - t && !~pct[N - b - 1].indexOf('*')) b++
while (l < M && !~pct.map(ln => ln[l]).indexOf('*')) l++
while (r < M - l && !~pct.map(l => l[M - r - 1]).indexOf('*')) r++

print(pct.slice(t, N - b).map(ln => ln.slice(l, M - r)).map(l => l.join('')).join('\n'))

var data = readline().split(' ').map(item => parseInt(item));
var n = data[0], m = data[1];
data = [];
for(var i = 0; i < n; i++) {
  data.push(readline());
}
var m1, m2, n1, n2;
for(var i = 0; i < n; i++) {
  for(var j = 0; j < m; j++) {
    if(data[i][j] === '*') {
      n1 = i;
      break;
    }
  }
  if(n1 != undefined) {
    break;
  }
}
for(var i = n - 1; i >= 0; i--) {
  for(var j = 0; j < m; j++) {
    if(data[i][j] === '*') {
      n2 = i;
      break;
    }
  }
  if(n2 != undefined) {
    break;
  }
}
for(var i = 0; i < m; i++) {
  for(var j = 0; j < n; j++) {
    if(data[j][i] === '*') {
      m1 = i;
      break;
    }
  }
  if(m1 != undefined) {
    break;
  }
}
for(var i = m - 1; i >= 0; i--) {
  for(var j = 0; j < n; j++) {
    if(data[j][i] === '*') {
      m2 = i;
      break;
    }
  }
  if(m2 != undefined) {
    break;
  }
}
for(var i = n1; i <= n2; i++) {
  print(data[i].substr(m1, m2 - m1 + 1));
}

var nm = readline().split(' ').map(Number);
var n = nm[0];
var m = nm[1];
var l = [];
var x1 = m-1;
var x2 = 0;
var y1 = n-1;
var y2 = 0;
for (var i=0; i<n; i++){
	l[i] = readline();
	for (var j=0; j<m; j++){
		if (l[i][j] == '*') {
			if (j < x1) x1 = j;
			if (j > x2) x2 = j;
			if (i < y1) y1 = i;
			if (i > y2) y2 = i;
		};
	}
}
for (var i=y1; i<=y2; i++){
	var ans = '';
	for (var j=x1; j<=x2; j++){
		ans += l[i][j];
	}
	print(ans);
}


"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
function asArrayNumber(testCase) {
    return testCase.split(' ').map((x) => {
        return parseInt(x, 10);
    });
}
function findGreatest(sisters) {
    return Math.max(...sisters);
}
function calculateDifference(greatest, sisters) {
    let difference = 0;
    for (let i = 0; i < sisters.length; i++) {
        difference = greatest - sisters[i] + difference;
    }
    return difference;
}
function solve(lines) {
    const testCases = lines.slice(1);
    for (let i = 0; i < testCases.length; i++) {
        const numbers = asArrayNumber(testCases[i]);
        const sisters = [numbers[0], numbers[1], numbers[2]];
        const n = numbers[3];
        const greatest = findGreatest(sisters);
        const difference = calculateDifference(greatest, sisters);
        const remainder = n - difference;
        if (remainder >= 0 && remainder % 3 === 0) {
            console.log('YES');
        }
        else {
            console.log('NO');
        }
    }
}
function main() {
    const stdinBuffer = fs_1.default.readFileSync(0);
    const lines = stdinBuffer
        .toString()
        .split('\n')
        .filter((x) => x !== '');
    solve(lines);
}
main();

var T = parseInt(readline(), 10);

for(var t=1; t<=T; t++) {
	var A = readline().split(' ').map(Number);
	var n = A.pop();

	A.sort((a,b)=> {return a-b;});

	var need = A[2]-A[0] + A[2]-A[1];
	if(need > n) print('NO');
	else {
		n -= need;
		if(n%3==0) print('YES');
		else print('NO');
	}
}

process.stdin.resume()
process.stdin.setEncoding('utf-8')

var arr = ''
process.stdin.on('data', (i) => {
  arr += i
})

process.stdin.on('end', () => {
  arr = arr.split('\n').map(a => a.replace(/(\r\n|\n|\r)/gm, ''))
  main(arr)
})

function wr(...x) {
  console.log(...x)
}

function sort(a, inc = true) {
  if(inc) a.sort((a, b) => a - b)
  else a.sort((a, b) => b - a)
}

function readInt(a, i) {
  if(i === undefined) return parseInt(a.shift())
  else return parseInt(a[i])
}

function readInts(a, i) {
  if(i === undefined) return arr.shift().split(' ').map(a => parseInt(a))
  else return arr[i].split(' ').map(a => parseInt(a))
}

function main(input) {
  let i = 0
  const t = readInt(input, i++)

  for(let j = 0; j < t; j++) {
    const as = readInts(input, i++)
    let n = as[3]
    const ax = [as[0], as[1], as[2]]
    sort(ax)

    n -= ax[2] - ax[1]
    n -= ax[2] - ax[0]
    if(n < 0 || n % 3 !== 0) wr('NO')
    else wr('YES')

  }
}

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  const arr = d.split(' ').map(Number);
  let coins = arr.pop();
  const max = Math.max(...arr);

  for (let i = 0; i < arr.length; i++) {
    if (arr[i] < max) {
      coins -= (max - arr[i]);
    }
  }

  if (coins < 0) {
    console.log('NO');
  }
  else if (coins % 3 !== 0) {
    console.log('NO');
  }
  else {
    console.log('YES');
  }

  c++;
});

'use strict';

const { createInterface } = require('readline');

const rl = createInterface({
  input: process.stdin,
  crlfDelay: Infinity
})
const lines = [];
let nextLine = 0;
rl.on('line', (line) => {
  lines.push(line);
});

rl.on('close', () => {
  main();
});

function readline() {
  return lines[nextLine++];
}

function solve(a, b, c, n) {
  const sum = a + b + c + n;
  if (sum % 3 !== 0) {
    return false;
  }
  const result = sum / 3;
  return (a <= result && b <= result && c <= result);
}

function main() {
  const t = parseInt(readline());
  for(let i = 0; i < t; i++) {
    const [a, b, c, n] = readline().split(' ').map(Number);
    const res = solve(a, b, c, n);
    console.log(res ? 'YES': 'NO');
  }
}

'use strict'

const problem = (a, b, c, n) => (x => (x < 0 || x % 3) ? 'NO' : 'YES')(a + b + c + n - 3 * Math.max(a, b, c));
let q = +readline();
while(q--) print(problem(...readline().split(' ').map(Number)))

function main() {
  var testCasesNum = +readline();
  for (var i = 0; i < testCasesNum; i++) {
    var abcd = readline().split(' ').map(Number);
    var a = abcd[0];
    var b = abcd[1];
    var c = abcd[2];
    var d = abcd[3];
    var max = Math.max(a, b, c);
    var dif = max * 3 - a - b - c;
    var res = (d - dif >= 0) && (d - dif) % 3 === 0
    print(res ? 'YES' : 'NO')
  }
}

main()

function main(input) {
    var arr = input.split("\n");
    var t = arr[0]
    for(var i = 0; i < t; i++) {

        var s = arr[i + 1].split(" ")
        a = parseInt(s[0])
        b = parseInt(s[1])
        c = parseInt(s[2])
        n = parseInt(s[3])

        f = Math.max(a, Math.max(b, c))
        d = (f - a) + (f - b) + (f - c)

        if (n < d) {
            process.stdout.write("NO\n")
            continue;
        } else {
            n -= d;
            if ((n % 3) === 0) {
                process.stdout.write("YES\n")
                continue;
            } else {
                process.stdout.write("NO\n")
            }
        }
    }
}

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;
});

process.stdin.on("end", function () {
   main(stdin_input);
});

'use strict';
var t = readline();
while(t--) {
    var a = readline().split(" ").map(function(num) {
        return parseInt(num);
    });
    var sum = a.reduce(function(total, num) {
        return total + num;
    }, 0);
    if(sum % 3) {
        print("NO");
    } else {
        var x = sum / 3;
        if(x-a[0] >=0 && x-a[1] >=0 && x-a[2] >= 0) {
            print("YES");
        } else {
            print("NO");
        }
    }

}

var t = parseInt(readline(), 10);

for(var i=1; i<=t; i++) {
    var inp = readline().split(' ');
    var n = parseInt(inp.pop(), 10);

    for(var j=0; j<3; j++) {
        inp[j] = parseInt(inp[j], 10);
    }

    inp.sort((a,b) => b-a);

    if((inp[0] - inp[1]) + (inp[0] - inp[2]) > n) {
        print('NO');
    } else if((inp[0] - inp[1]) + (inp[0] - inp[2]) === n) {
        print('YES');
    } else {
        n -= (inp[0] - inp[1]) + (inp[0] - inp[2]);

        if(n%3 === 0) print('YES');
        else print('NO');
    }
}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

/**
 *
 * @param {*} str
 * @param {*} seperator
 */
function splitter(str, seperator = '') {
    return str.trim().split(seperator);
}

/**
 *
 * @param {*} arr
 */
function strToNumArr(arr = []) {
    return arr.map(num => Number(num));
}

/**
 *
 * @param {*} num1
 * @param {*} num2
 */
function matrixArray(num1, num2) {
    return Array(num1).fill(Array(num2));
}

let log = function () {
    return Function.prototype.bind.call(console.log, console, '');
}();

function removeEmptyItem(arr, index) {
    return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));
}

function range(min, max) {

    let arr = [];
    for (let index = min; index < max; index++) {
        arr.push(index);

    }
    return arr;
}

function main(input) {
    let output = nameLookUp(input);
    //process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {

    let inputs = str.trim().split('\n');
    let t = +inputs[0].trim();
    for (let index = 1; index <= t; index++) {
        const element = inputs[index].trim().split(' ');
        let n = element[3];
        let coins = strToNumArr(element.slice(0, 3).sort((a, b) => b - a));
        n -= ((2 * coins[0]) - coins[1] - coins[2]);
        if (n < 0 || n % 3 != 0) {
            console.log('NO');
        } else {
            console.log('YES');
        }
    }

}

'use strict';

let inputString = '', currentLine = 0, inputLine = [];

const rl = require('readline').createInterface({ input: process.stdin, output: process.stdout });
rl.on('line', line => { inputLine.push(line); });
rl.on('close', () =>{ main(inputLine); } );

function readALine() { return inputLine[currentLine++]; }
function printALine(str) { console.log(str); }

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver < 0 ) return "NO";
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputLine = inLines;

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

module.exports.main = main;

'use strict'

const problem = (a, b, c, n) => (a + b + c + n - 3 * Math.max(a, b, c)) % 3 ? 'NO' : 'YES';
let q = +readline();
while(q--) print(problem(...readline().split(' ').map(Number)))

function main() {
  var testCasesNum = +readline();
  for (var i = 0; i < testCasesNum; i++) {
    var abcd = readline().split(' ').map(Number);
    var a = abcd[0];
    var b = abcd[1];
    var c = abcd[2];
    var d = abcd[3];
    var ca = c - a;
    var cb = c - b;
    var res = (d - ca - cb > 0) && (d - ca - cb) % 3 === 0
    print(res ? 'YES' : 'NO')
  }
}
main();

function main() {
  var testCasesNum = +readline();
  for (var i = 0; i < testCasesNum; i++) {
    var abcd = readline().split(' ').map(Number);
    var a = abcd[0];
    var b = abcd[1];
    var c = abcd[2];
    var d = abcd[3];
    var ca = c - a;
    var cb = c - b;
    var res = (d - ca - cb >= 0) && (d - ca - cb) % 3 === 0
    print(res ? 'YES' : 'NO')
  }
}
main();

'use strict';
var t = readline();
while(t--) {
    var a = readline().split(" ").map(function(num) {
        return parseInt(num);
    }).reduce(function(total, num) {
        return total + num;
    }, 0);
    print(((a % 3) ? "NO" : "YES") + "\n");

}

var num_tests = readline();
var coins = [];
for(var i=0;i<num_tests;i++){
	coins.push(readline().split(' '));
}
for(var i=0;i<coins.length;i++){
	var j = coins[i];
	var soma = j[0]+j[1]+j[2]+j[3];
  if(soma%3 > 0 || soma%3 < 0){
    print('NO');
  }else{
  	print('YES');
  }
}

var num_tests = readline();
var coins = [];
for(var i=0;i<num_tests;i++){
	coins.push(readline());
}
for(var i=0;i<coins.length;i++){
	var j = coins[i];
	var soma = j[0]+j[1]+j[2]+j[3];
  if(soma%3 > 0 || soma%3 < 0){
    print('NO');
  }else{
  	print('YES');
  }
}

var t = readline();
while(t--){
	var j = readline().split(' ').map(Number);
	var soma = j[0]+j[1]+j[2]+j[3];
	var d1,d2
	if(j[2]>j[1]){
	    d1 = Math.abs(j[2]-j[1]);
	    d2 = Math.abs(j[2]-j[0]);
	}else{
	    d1 = Math.abs(j[1]-j[2]);
	    d2 = Math.abs(j[1]-j[0]);
	}
	var dt = d1+d2;
	if(j[3]>=dt){
	    soma -= dt;
	    if(soma%3 > 0 || soma%3 < 0){
            print('NO');
        }else{
  	        print('YES');
        }
	}else{
	    print('NO');
	}
}

var t = readline();
while(t--){
	var j = readline().split(' ');
	var soma = j[0]+j[1]+j[2]+j[3];
	var d1,d2
	if(j[2]>j[1]){
	    d1 = Math.abs(j[2]-j[1]);
	    d2 = Math.abs(j[2]-j[0]);
	}else{
	    d1 = Math.abs(j[1]-j[2]);
	    d2 = Math.abs(j[1]-j[0]);
	}
	var dt = d1+d2;
	if(j[3]>=dt){
	    if(soma%3 > 0 || soma%3 < 0){
            print('NO');
        }else{
  	        print('YES');
        }
	}else{
	    print('NO');
	}
}

var num_tests = readline();
var coins = [];
for(var i=0;i<num_tests;i++){
	coins.push(readline());
}
for(var i=0;i<coins.length;i++){
	var j = coins[i];
	var soma = j[0]+j[1]+j[2]+j[3];
  soma = soma%3;
  if(soma !== 0){
    print('NO');
  }else{
  	print('YES');
  }
}

var t = readline();
while(t--){
	var j = readline().split(' ').map(Number);
	var soma = j[0]+j[1]+j[2]+j[3];
	var d1,d2
	if(j[2]>j[1]){
	    d1 = Math.abs(j[2]-j[1]);
	    d2 = Math.abs(j[2]-j[0]);
	}else{
	    d1 = Math.abs(j[1]-j[2]);
	    d2 = Math.abs(j[1]-j[0]);
	}
	var dt = d1+d2;
	if(j[3]>=dt){
	    if(soma%3 > 0 || soma%3 < 0){
            print('NO');
        }else{
  	        print('YES');
        }
	}else{
	    print('NO');
	}
}

var num_tests = readline();
var coins = [];
for(var i=0;i<num_tests;i++){
	coins.push(readline().split(' '));
}
for(var i=0;i<coins.length;i++){
	var j = coins[i];
	var soma = j[0]+j[1]+j[2]+j[3];
	var d1,d2
	if(j[2]>j[1]){
	    d1 = Math.abs(j[2]-j[1]);
	    d2 = Math.abs(j[2]-j[0]);
	}else{
	    d1 = Math.abs(j[1]-j[2]);
	    d2 = Math.abs(j[1]-j[0]);
	}
	var dt = d1+d2;
	if(j[3]>=dt){
	    if(soma%3 > 0 || soma%3 < 0){
            print('NO');
        }else{
  	        print('YES');
        }
	}else{
	    print('NO');
	}
}

var num_tests = readline();
var coins = [];
for(var i=0;i<num_tests;i++){
	print(readline());
}

var num_tests = readline();
var coins = [];
for(var i=0;i<num_tests;i++){
	coins.push(readline());
}
for(var i=0;i<coins.length;i++){
	var j = coins[i];
	var soma = j[0]+j[1]+j[2]+j[3];
  if(soma%3){
    print('NO');
  }else{
  	print('YES');
  }
}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

/**
 *
 * @param {*} str
 * @param {*} seperator
 */
function splitter(str, seperator = '') {
    return str.trim().split(seperator);
}

/**
 *
 * @param {*} arr
 */
function strToNumArr(arr = []) {
    return arr.map(num => Number(num));
}

/**
 *
 * @param {*} num1
 * @param {*} num2
 */
function matrixArray(num1, num2) {
    return Array(num1).fill(Array(num2));
}

let log = function () {
    return Function.prototype.bind.call(console.log, console, '');
}();

function removeEmptyItem(arr, index) {
    return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));
}

function range(min, max) {

    let arr = [];
    for (let index = min; index < max; index++) {
        arr.push(index);

    }
    return arr;
}

function main(input) {
    let output = nameLookUp(input);
    //process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {

    let inputs = str.trim().split('\n');
    let t = +inputs[0].trim();
    for (let index = 1; index <= t; index++) {
        const element = inputs[index].trim().split(' ');
        let n = element[3];
        let coins = strToNumArr(element.slice(0, 3).sort((a, b) => b - a));
        if (n > 0 && (n - ((2 * coins[0]) - coins[1] - coins[2])) % 3 === 0) {
            console.log('YES');
        }
        else {
            console.log('NO');
        }
    }

}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

/**
 *
 * @param {*} str
 * @param {*} seperator
 */
function splitter(str, seperator = '') {
    return str.trim().split(seperator);
}

/**
 *
 * @param {*} arr
 */
function strToNumArr(arr = []) {
    return arr.map(num => Number(num));
}

/**
 *
 * @param {*} num1
 * @param {*} num2
 */
function matrixArray(num1, num2) {
    return Array(num1).fill(Array(num2));
}

let log = function () {
    return Function.prototype.bind.call(console.log, console, '');
}();

function removeEmptyItem(arr, index) {
    return arr.slice(0, index).concat(arr.slice(index + 1, arr.length));
}

function range(min, max) {

    let arr = [];
    for (let index = min; index < max; index++) {
        arr.push(index);

    }
    return arr;
}

function main(input) {
    let output = nameLookUp(input);
    //process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {

    let inputs = str.trim().split('\n');
    let t = +inputs[0].trim();
    for (let index = 1; index <= t; index++) {
        const element = inputs[index].trim().split(' ');
        let n = element[3];
        let coins = strToNumArr(element.slice(0, 3).sort((a, b) => b - a));
        if ((n - ((2 * coins[0]) - coins[1] - coins[2])) % 3 === 0) {
            console.log('YES');
        }
        else {
            console.log('NO');
        }
    }

}

var inputLines = null;

function readALine() {
    if( inputLines ) { return inputLines.shift(); }
    return readline();
}

function printALine(str) {
    console.log(str);
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputLines = inLines;

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

module.exports = { main: main, inputLines: inputLines };

'use strict';

let inputString = '', currentLine = 0;

process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });
    console.log("CALL MAIN");
    main();
});

function readALine() {
    return inputString[currentLine++];
}

function printALine(str) {
    console.log(str);
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputString = (inLines ? inLines : []);

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

// module.exports.main = main;

'use strict';

let inputString = '', currentLine = 0, inputLine = [];

process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    var arr = inputString.trim().split('\n').map(str => {
        return str.trim();
    });
    main(arr);
});

function readALine() {
    return inputLine[currentLine++];
}

function printALine(str) {
    console.log(str);
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputLine = inLines;

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

// module.exports.main = main;

var inputLines = null;

function readALine() {
    if( inputLines ) { return inputLines.shift(); }
    return readline();
}

function printALine(str) {
    console.log(str);
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputLines = inLines;

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

//module.exports = { main: main, inputLines: inputLines };

'use strict';

let inputString = '', currentLine = 0;

process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });
    console.log("Inputstring" + inputString);
    main();
});

function readALine() {
    return inputString[currentLine++];
}

function printALine(str) {
    console.log(str);
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputString = (inLines ? inLines : []);

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

// module.exports.main = main;

'use strict';

let inputString = '', currentLine = 0;

process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });
    main();
});

function readALine() {
    return inputString[currentLine++];
}

function printALine(str) {
    console.log(str);
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputString = (inLines ? inLines : []);

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

module.exports.main = main;

let inputLines = [];
const printALine = console.log
const rl = require('readline').createInterface({ input: process.stdin, output: process.stdout })
rl.on('line', line => { inputLines.push(line); });
rl.on('close', main);
let rlindex = 0;
function readALine() {
    return inputLines[rlindex++];
}

// ======================================================
// A. Collecting Coins
// https://codeforces.com/problemset/problem/1294/A
// ======================================================

function stringArrayToNumbers(str) {
    return str.split(' ').map(Number);
}

function doIt( a, b, c, n ) {
    var max = Math.max(a, b, c);
    var coinToGive = 3*max - (a + b + c);
    var leftOver = n - coinToGive;
    if( leftOver % 3 == 0 ) return "YES";
    return "NO";
}

function main( inLines ) {

    inputLines = inLines ? inLines : [];

    var numOfTests = parseInt(readALine());
    for( var i = 0; i < numOfTests; i++ ) {
        var string1 = readALine();
        var arr = stringArrayToNumbers(string1);
        var result = doIt(arr[0], arr[1], arr[2], arr[3]);
        printALine(result);
    }

}

module.exports.main = main;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
function asArrayNumber(testCase) {
    return testCase.split(' ').map((x) => {
        return parseInt(x, 10);
    });
}
function findGreatest(sisters) {
    return Math.max(...sisters);
}
function calculateDifference(greatest, sisters) {
    let difference = 0;
    for (let i = 0; i < sisters.length; i++) {
        difference = greatest - sisters[i] + difference;
    }
    return difference;
}
function solve(lines) {
    const testCases = lines.slice(1);
    // console.log('testCases', testCases)
    for (let i = 0; i < testCases.length; i++) {
        const numbers = asArrayNumber(testCases[i]);
        const sisters = [numbers[0], numbers[1], numbers[2]];
        const n = numbers[3];
        // console.log('sisters, n', sisters, n)
        const greatest = findGreatest(sisters);
        const difference = calculateDifference(greatest, sisters);
        const remainder = n - difference;
        if (remainder > 0 && remainder % 3 === 0) {
            console.log('YES');
        }
        else {
            console.log('NO');
        }
    }
}
function main() {
    const stdinBuffer = fs_1.default.readFileSync(0);
    const lines = stdinBuffer
        .toString()
        .split('\n')
        .filter((x) => x !== '');
    solve(lines);
}
main();

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  if (d.split(' ').map(Number).reduce((x, y) => x + y, 0) % 3 === 0) {
    console.log('YES');
  }
  else {
    console.log('NO');
  }

  c++;
});

'use strict';

const { createInterface } = require('readline');

const rl = createInterface({
  input: process.stdin,
  crlfDelay: Infinity
})
const lines = [];
let nextLine = 0;
rl.on('line', (line) => {
  lines.push(line);
});

rl.on('close', () => {
  main();
});

function readline() {
  return lines[nextLine++];
}

function solve(a, b, c, n) {
  const sum = a + b + c + n;
  return (sum % 3 === 0) ? 'YES' : 'NO';
}

function main() {
  const t = parseInt(readline());
  for(let i = 0; i < t; i++) {
    const [a, b, c, n] = readline().split(' ');
    const res = solve(a, b, c, n);
    console.log(res);
  }
}

'use strict';

const { createInterface } = require('readline');

const rl = createInterface({
  input: process.stdin,
  crlfDelay: Infinity
})
const lines = [];
let nextLine = 0;
rl.on('line', (line) => {
  lines.push(line);
});

rl.on('close', () => {
  main();
});

function readline() {
  return lines[nextLine++];
}

function solve(a, b, c, n) {
  const sum = a + b + c + n;
  if (sum % 3 !== 0) {
    return false;
  }
  const result = sum / 3;
  return (a <= result && b <= result && c <= result);
}

function main() {
  const t = parseInt(readline());
  for(let i = 0; i < t; i++) {
    const [a, b, c, n] = readline().split(' ');
    const res = solve(a, b, c, n);
    console.log(res ? 'YES': 'NO');
  }
}


const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  console.log(d);

  c++;
});

var tests = parseInt(readline())
for(var t = 0; t < tests; t ++){ print(readline()) }

//=> function
// ES5
/*
var x = function (x, y) {
    return x * y;
}

// ES6
const x = (x, y) => x * y;
*/

var t = +readline();
while(t--)
{
    x = +readline();
    print(x);
}

var t = readline();

while (t--) {
  print(readline());
}

const n = Number(readline());
var inp ;
for(var i = 0; i < n; i++ ){
    inp = Number(readline());
    print(inp);
}

var t = parseInt(readline());

for (var i = 0; i < t; i++) {
    print(readline());
}

var input = readline();

for(var i=0;i<input;i++) {
    var val = parseInt(readline());
    print(val);
}

var tc = Number(readline())
while(tc--) {
    var n = Number(readline())
    print(n)
}

var tc = readline()
while(tc--) {
    var n = readline()
    print(n)
}

// Q: https://codeforces.com/contest/1339/problem/A

const readline = require('readline');

let input = [];

const rl = readline.createInterface({
	input: process.stdin,
	output: process.stdout,
});

rl.on('line', lineInput => {
	input.push(lineInput);
});

rl.on('close', () => {
	const test = parseInt(input[0]);
	for (let t=0; t < test; t++) {
		let n = parseInt(parseInt(input[t+1]));
		console.log(n);
	}
});

function solution(n) {
	let ans = Array(n+1).fill(0);
	ans[0] = 0;
	for (let i = 1; i < n+1; i++) {
		ans[i] = ans[i-1] + 1;
	}
	return ans[n];
}

// Q: https://codeforces.com/contest/1339/problem/A

const readline = require('readline');

let input = [];

const rl = readline.createInterface({
	input: process.stdin,
	output: process.stdout,
});

rl.on('line', lineInput => {
	input.push(lineInput);
});

rl.on('close', () => {
	const test = parseInt(input[0]);
	for (let t=0; t < test; t++) {
		let n = parseInt(input[t+1]);
		console.log(n);
	}
});

const readline = require('readline');

const rl = readline.createInterface({
    input: process.stdin
});

let first = true;
rl.on('line', (line) => {
    if (first) {
      first = false;
    } else {
      process.stdout.write(line  + '\n')
    }
})

let i = '';
let lines;
process.stdin.on('data', (c) => (i += c));
process.stdin.on('end', () => {
  const { EOL } = require('os');
  lines = i.split(EOL); /*your input text, split by lines*/
  main();
});

function solve(nums) {

}

function main() {
  let currentLine = 0;
  const readLine = (_) => lines[currentLine++].split(' ').map((val) => parseInt(val));

  const test = readLine()[0];
  for (let t = 1; t <= test; ++t) {
    const n = readLine()[0];
    console.log(n);
  }
}

const readline = require("readline");

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
});

let arr = [];

rl.on("line", (line) => {
    arr.push(line);
}).on("close", () => {
    solve(arr);
    process.exit(0);
});

function solve(lines) {
    let row = 0;
    let t = +lines[row++];
    for(let i = 0; i < t; i++) {
        let n = +lines[row++];
        console.log(n);
    }
}

process.stdin.setEncoding("ascii");
var input = "";
process.stdin.on("data", data => input += data);
process.stdin.on("end", () => {
	var lines = input.split('\n');
	for (i = 1; i < lines.length; i++)
		process.stdout.write(lines[i]);
});

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
  inputString += inputStdin;
});

process.stdin.on('end', _ => {
  inputString = inputString.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));
  main();
});

function readLine() {
  return inputString[currentLine++];
}

function main() {
  const t = parseInt(readLine());
  for (let i = 0; i < t; i++) {
    let [a] = readLine().split(' ').map((val) => parseInt(val));
    console.log(a);
  }
  //process.stdout.write("hello: ");
}

const readline = require('readline');

const rl = readline.createInterface({
    input: process.stdin
});

let first = true;
rl.on('line', (line) => {
    if (first) {
      first = false;
    } else {
      process.stdout.write(line)
    }
})

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  console.log(+d);

  c++;
});

process.stdin.setEncoding('ascii');
var T = -1

process.stdin.on('data', function (data) {
  if (T < 0)
    T = parseInt(data);
  else {
    process.stdout.write(data);
    T--;
    if (T == 0)
      process.exit();
  }
});