#include <bits/stdc++.h>
using namespace std;
string S;
void solve() {
  stack<char> stk;
  for (int i = 0; i < S.size(); i++) {
    char c = S[i];
    if (c == '<' || c == '>') continue;
    if (c == '/') {
      stk.pop();
      for (int j = 0; j < stk.size(); j++) {
        cout << "  ";
      }
      i++;
      c = S[i];
      cout << "</" << c << ">";
      cout << endl;
    } else {
      for (int j = 0; j < stk.size(); j++) {
        cout << "  ";
      }
      cout << "<" << c << ">";
      cout << endl;
      stk.push(c);
    }
  }
}
int main() {
  cin >> S;
  solve();
  return 0;
}
