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