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