#include <bits/stdc++.h>
using namespace std;
string s;
string st = "";
int main() {
  cin >> s;
  for (int i = 0; i < (int)(s).size();)
    if (s[i + 1] == '/') {
      st.erase((int)(st).size() - 1, 1);
      for (int(j) = 0; (j) < ((int)(st).size() * 2); ++(j)) cout << " ";
      cout << "</" << s[i + 2] << ">\n";
      i += 4;
    } else {
      for (int(j) = 0; (j) < ((int)(st).size() * 2); ++(j)) cout << " ";
      cout << "<" << s[i + 1] << ">\n";
      st += s[i + 1];
      i += 3;
    }
}
