#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  vector<char> v;
  for (int i = 0; i < s.size(); i++) {
    if (!(s[i] == '<' || s[i] == '>' || s[i] == '/')) {
      v.push_back(s[i]);
      for (int i = 0; i < (v.size() - 1); ++i) cout << "  ";
      cout << "<" << s[i] << ">" << '\n';
    }
    if (s[i] == '/') {
      for (int i = 0; i < (v.size() - 1); ++i) cout << "  ";
      cout << "</" << *(v.rbegin()) << ">" << '\n';
      ++i;
      v.pop_back();
    }
  }
  return 0;
}
