#include <bits/stdc++.h>
using namespace std;
string st, t;
vector<string> a;
int p;
int main() {
  ios_base ::sync_with_stdio(false);
  cin >> st;
  for (auto i : st) {
    t += i;
    if (i == '>') {
      a.push_back(t);
      t = "";
    }
  }
  for (auto i : a) {
    if (i[1] == '/') {
      --p;
    }
    for (int j = 0; j < p; ++j) {
      cout << "  ";
    }
    cout << i << endl;
    if (i[1] != '/') {
      ++p;
    }
  }
}
