#include <bits/stdc++.h>
using namespace std;
string deepSpace(int deep) {
  string res = "";
  for (int i = 0; i < deep; i++) {
    res += "  ";
  }
  return res;
}
int main() {
  string str;
  cin >> str;
  int deep = 0;
  int prevI = 0;
  int ind1, ind2;
  ind1 = str.find('<');
  string res = "";
  bool deepF = false;
  while ((ind2 = str.find('>')) < str.length()) {
    res += deepSpace(deep) + str.substr(prevI, ind2 + 1) + "\n";
    str = str.substr(ind2 + 1);
    if (str[ind1 + 1] == '/') {
      if (deepF) deep--;
      deepF = true;
    } else {
      if (!deepF) deep++;
      deepF = false;
    }
  }
  cout << res;
  return 0;
}
