#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int flag = 0;
  string space;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '<') {
      flag = 1;
      continue;
    }
    if (flag == 1) {
      char ch;
      int f = 0;
      ch = s[i];
      if (ch == '/') {
        char c = s[i + 1];
        int l = space.length();
        space.resize(l - 2);
        cout << space << "</" << c << ">\n";
        flag = 0;
        l = space.length();
        i += 1;
        continue;
      } else {
        char c = s[i];
        cout << space << "<" << c << ">\n";
        flag = 0;
        i++;
        space.push_back(' ');
        space.push_back(' ');
        f = 1;
        continue;
      }
    }
  }
}
