#include <cstdio>
using namespace std;
int main()
{
	int T;
	long long n;
	scanf("%d", &T);
	while (T--)
	{
		scanf("%lld", &n);
		if (n % 3 == 0) printf("%lld %lld %lld\n", n / 3, n / 3, n / 3);
		else if (n % 4 == 0) printf("%lld %lld %lld\n", n / 4, n / 4, n / 2);
		else puts("IMPOSSIBLE");
	}
	return 0;
}