#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s = "";
  string res = "";
  cin >> s;
  int l = s.length();
  if (l) {
    string t = "";
    bool c = 0;
    for (int i = 0, h = -1; i < l; t = "") {
      if (s[i] == '<') {
        t += s[i];
        if (s[i + 1] == '/')
          c = 1;
        else {
          c = 0;
          h++;
        }
        while (i < l && s[i++] != '>') t += s[i];
        for (int j = 0; j < 2 * h; j++) res += ' ';
        res += (t + '\n');
        if (c) h--;
      } else {
        t += s[i];
        while (i < l && s[i++] != '<') t += s[i];
        for (int j = 0; j < 2 * h; j++) res += ' ';
        res += (t + '\n');
      }
    }
    cout << res << '\n';
  } else
    cout << s << '\n';
  return 0;
}
