#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
int h;
string s;
int main() {
  cin >> s;
  h = 0;
  int pos = 0;
  while (pos < int((s).size())) {
    if (s[pos + 1] == '/') {
      h--;
      for (int i = (0); i < (h); i++) cout << "  ";
      cout << s.substr(pos, 4) << endl;
      pos += 4;
    } else {
      for (int i = (0); i < (h); i++) cout << "  ";
      cout << s.substr(pos, 3) << endl;
      h++;
      pos += 3;
    }
  }
  return 0;
}
