#include <iostream>
#include <string>
#include <vector>
#include <iterator>
#include <sstream>
using namespace std;

bool input(){
	cin.peek();
	if(cin.eof()){ return false; }
	string s;
	getline(cin, s);
	if(!cin){ throw 0; }
	stringstream ss1(s), ss2;
	istream_iterator<int> beg(ss1), en;
	vector<int> ret(beg, en);
	for(size_t i = 0; i < ret.size(); ++i){
		if(i){ ss2 << ' '; }
		ss2 << ret[i];
	}
	if(ss2.str() != s){ throw 0; }
	if(ret.size() < 2 || ret.size() > 13){ throw 0; }
	return true;
}

int main(){
	while(input());
}