#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  string s;
  cin >> s;
  bool close = false;
  int n = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '>') {
      string space;
      space = "";
      for (int j = i - 3; j <= i; j++) {
        if (s[j] == '/') close = true;
      }
      if (close == false) {
        n++;
      } else {
        n--;
      }
      if (close == false) {
        for (int j = 0; j < n - 1; j++) {
          space.append("  ");
        }
      } else {
        for (int j = 0; j < n; j++) {
          space.append("  ");
        }
      }
      string p;
      if (close == false) {
        p = s.substr(i - 2, 3);
      } else {
        p = s.substr(i - 3, 4);
      }
      cout << space.append(p) << endl;
      close = false;
    }
  }
  return 0;
}
