#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++)
#define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; i--)
#define REP(i,a) for(int i=0,_a=(a); i<_a; i++)
#define EACH(it,a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); ++it)
#define SZ(S) ((int) ((S).size()))
#define DEBUG(x) { cout << #x << " = " << x << endl; }
#define PR(a,n) { cout << #a << " = "; FOR(_,1,n) cout << a[_] << ' '; cout << endl; }
#define PR0(a,n) { cout << #a << " = "; REP(_,n) cout << a[_] << ' '; cout << endl; }
int main() {
ios :: sync_with_stdio(false); cin.tie(NULL);
cout << (fixed) << setprecision(6);
int a, b, c;
while (cin >> a >> b >> c && a) {
if (a == b && b == c) { // set
if (a == 13) cout << '*' << endl;
else {
int x = a + 1;
cout << x << ' ' << x << ' ' << x << endl;
}
}
else if (a != b && b != c && c != a) {
cout << 1 << ' ' << 1 << ' ' << 2 << endl;
}
else {
int x, y;
if (a == b) x = a, y = c;
if (b == c) x = b, y = a;
if (c == a) x = c, y = b;
vector<int> res;
bool ok = false;
FOR(i,1,13) FOR(j,1,13) if (i != j) {
if (ok) break;
if (i > x || (i == x && j > y)) {
ok = true;
res = vector<int> {i, i, j};
break;
}
}
if (!ok) res = vector<int> {1,1,1};
sort(res.begin(), res.end());
cout << res[0] << ' ' << res[1] << ' ' << res[2] << endl;
}
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIEZPUihpLGEsYikgZm9yKGludCBpPShhKSxfYj0oYik7IGk8PV9iOyBpKyspCiNkZWZpbmUgRk9SRChpLGEsYikgZm9yKGludCBpPShhKSxfYj0oYik7IGk+PV9iOyBpLS0pCiNkZWZpbmUgUkVQKGksYSkgZm9yKGludCBpPTAsX2E9KGEpOyBpPF9hOyBpKyspCiNkZWZpbmUgRUFDSChpdCxhKSBmb3IoX190eXBlb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Hk7CiAgICAgICAgICAgIGlmIChhID09IGIpIHggPSBhLCB5ID0gYzsKICAgICAgICAgICAgaWYgKGIgPT0gYykgeCA9IGIsIHkgPSBhOwogICAgICAgICAgICBpZiAoYyA9PSBhKSB4ID0gYywgeSA9IGI7CgogICAgICAgICAgICB2ZWN0b3I8aW50PiByZXM7CiAgICAgICAgICAgIGJvb2wgb2sgPSBmYWxzZTsKICAgICAgICAgICAgRk9SKGksMSwxMykgRk9SKGosMSwxMykgaWYgKGkgIT0gaikgewogICAgICAgICAgICAgICAgaWYgKG9rKSBicmVhazsKCiAgICAgICAgICAgICAgICBpZiAoaSA+IHggfHwgKGkgPT0geCAmJiBqID4geSkpIHsKICAgICAgICAgICAgICAgICAgICBvayA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgcmVzID0gdmVjdG9yPGludD4ge2ksIGksIGp9OwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghb2spIHJlcyA9IHZlY3RvcjxpbnQ+IHsxLDEsMX07CiAgICAgICAgICAgIHNvcnQocmVzLmJlZ2luKCksIHJlcy5lbmQoKSk7CiAgICAgICAgICAgIGNvdXQgPDwgcmVzWzBdIDw8ICcgJyA8PCByZXNbMV0gPDwgJyAnIDw8IHJlc1syXSA8PCBlbmRsOwogICAgICAgIH0KICAgIH0KICAgIHJldHVybiAwOwp9Cgo=