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