#include <bits/stdc++.h>
using namespace std;
int main() {
string s = " Hello world! ";
s.erase(0, s.find_first_not_of(" \n\r\t"));
cout << s; /*Hello world! */
s.erase(s.find_last_not_of(" \n\r\t") + 1);
cout << s; /*Hello world!*/
return 0;
}