#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a, n = 0;
  a = s.size();
  for (int i = 0; i < a; i++) {
    if (s[i] == '<' && s[i + 1] == '/') {
      cout << endl;
      for (int j = 0; j < n; j++) cout << "  ";
      n--;
    } else if (s[i] == '<' && i != 0) {
      n++;
      cout << endl;
      for (int j = 0; j < n; j++) cout << "  ";
    }
    cout << s[i];
  }
}
