#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, i, j;
  char co, cc, c1, c2;
  string s;
  getline(cin, s);
  vector<char> z;
  i = 0;
  while (true) {
    co = s[i];
    i++;
    c1 = s[i];
    i++;
    if (c1 != '/') {
      cc = s[i];
      i++;
      z.push_back(cc);
      for (j = 0; j < z.size() - 1; j++) cout << "  ";
      cout << "<" << c1 << ">" << endl;
    } else {
      c2 = s[i];
      i++;
      cc = s[i];
      i++;
      for (j = 0; j < z.size() - 1; j++) cout << "  ";
      cout << "</" << c2 << ">" << endl;
      z.pop_back();
    }
    if (i >= s.size()) break;
  }
  return 0;
}
