#include <iostream>
#include <functional>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <unordered_map>
#include <iterator>
using namespace std;
using arguments = vector<string>;
using command = function<void(arguments const &)>;
using commands = unordered_map<string, command>;
vector<string> str_to_tokens(string const &src) {
istringstream stream(src);
return {
istream_iterator<string>{stream},
istream_iterator<string>{}
};
}
void print(arguments const &args) {
for(auto &&arg: args) {
cout << arg << " ";
}
cout << endl;
}
int main() {
commands cmds = {
{"print", print}
};
string input;
while(getline(cin, input)) {
if(input.empty()) {
continue;
}
auto tokens = str_to_tokens(input);
auto cmd = tokens[0];
cmds.at(cmd)(arguments{begin(tokens)+1, end(tokens)});
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHNzdHJlYW0+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDx1bm9yZGVyZWRfbWFwPgojaW5jbHVkZSA8aXRlcmF0b3I+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp1c2luZyBhcmd1bWVudHMgPSB2ZWN0b3I8c3RyaW5nPjsKdXNpbmcgY29tbWFuZCA9IGZ1bmN0aW9uPHZvaWQoYXJndW1lbnRzIGNvbnN0ICYpPjsKdXNpbmcgY29tbWFuZHMgPSB1bm9yZGVyZWRfbWFwPHN0cmluZywgY29tbWFuZD47Cgp2ZWN0b3I8c3RyaW5nPiBzdHJfdG9fdG9rZW5zKHN0cmluZyBjb25zdCAmc3JjKSB7Cglpc3RyaW5nc3RyZWFtIHN0cmVhbShzcmMpOwoJcmV0dXJuIHsKCQlpc3RyZWFtX2l0ZXJhdG9yPHN0cmluZz57c3RyZWFtfSwKCQlpc3RyZWFtX2l0ZXJhdG9yPHN0cmluZz57fQoJfTsKfQoKdm9pZCBwcmludChhcmd1bWVudHMgY29uc3QgJmFyZ3MpIHsK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