#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<char> vec;
  char tmp;
  string st;
  cin >> st;
  vector<int> H;
  vector<char> C;
  for (int i = 0; i < st.length();) {
    tmp = st[i + 1];
    if (tmp == '/') {
      tmp = st[i + 2];
      for (int j = 0; j < 2 * vec.size() - 2; ++j) cout << " ";
      cout << "</" << vec[vec.size() - 1] << ">\n";
      vec.pop_back();
      i += 4;
    } else {
      vec.push_back(tmp);
      for (int j = 0; j < 2 * vec.size() - 2; ++j) cout << " ";
      cout << "<" << vec[vec.size() - 1] << ">\n";
      i += 3;
    }
  }
  return 0;
}
