#include <bits/stdc++.h>
using namespace std;
string a[300007], b[300007];
int main() {
  string s;
  cin >> s;
  vector<string> vc;
  for (auto i = (0); i <= ((int)s.size() - 1); ++i) {
    if (s[i] == '<') {
      int j = i + 1;
      string res = "";
      while (s[j] != '>') res += s[j++];
      vc.emplace_back(res);
      i = j;
    }
  }
  vector<string> vt;
  int spaces = 0;
  for (auto i = (0); i <= ((int)vc.size() - 1); ++i) {
    if (vt.size() && "/" + vt.back() == vc[i]) {
      --spaces;
      for (auto j = (1); j <= (2 * spaces); ++j) cout << " ";
      cout << "<";
      vt.pop_back();
    } else {
      for (auto j = (1); j <= (2 * spaces); ++j) cout << " ";
      cout << "<";
      vt.emplace_back(vc[i]);
      ++spaces;
    }
    cout << vc[i];
    cout << ">" << endl;
  }
  return 0;
}
