#include <iostream>
using namespace std;
int main() {
int A;
int B;
int C;
cin >> A >> B >> C;
if ((A + B) % 2 == 0) {
cout << "TAK" << "\n";
cout << A << " " << B;
} else if ((C + B) % 2 == 0) {
cout << "TAK" << "\n";
cout << C << " " << B;
} else if ((C + A) % 2 == 0) {
cout << "TAK" << "\n";
cout << C << " " << A;
} else {
cout << "NIE";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpbnQgQTsKICAgIGludCBCOwogICAgaW50IEM7CiAgICBjaW4gPj4gQSA+PiBCID4+IEM7CgogICAgaWYgKChBICsgQikgJSAyID09IDApIHsKICAgICAgICBjb3V0IDw8ICJUQUsiIDw8ICJcbiI7CiAgICAgICAgY291dCA8PCBBIDw8ICIgIiA8PCBCOwogICAgfSBlbHNlIGlmICgoQyArIEIpICUgMiA9PSAwKSB7CiAgICAgICAgY291dCA8PCAiVEFLIiA8PCAiXG4iOwogICAgICAgIGNvdXQgPDwgQyA8PCAiICIgPDwgQjsKICAgIH0gZWxzZSBpZiAoKEMgKyBBKSAlIDIgPT0gMCkgewogICAgICAgIGNvdXQgPDwgIlRBSyIgPDwgIlxuIjsKICAgICAgICBjb3V0IDw8IEMgPDwgIiAiIDw8IEE7CiAgICB9IGVsc2UgewogICAgCWNvdXQgPDwgIk5JRSI7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K