#include <bits/stdc++.h>
using namespace std;
int n, f, d, h;
string s;
stack<string> st;
inline int getNext(const int& ind) {
  for (int i = ind;; i++)
    if (s[i] == '>') return i;
}
int main() {
  cin >> s;
  int ssize = s.size();
  for (int i = 0; i < ssize; i++) {
    if (s[i] == '<') {
      if (s[i + 1] != '/') {
        int _do = getNext(i) + 1;
        for (int j = 0; j < 2 * h; j++) cout << string(" ");
        cout << s.substr(i, _do - i) << endl;
        h++;
      } else {
        h--;
        for (int j = 0; j < 2 * h; j++) cout << string(" ");
        cout << s.substr(i, getNext(i) - i + 1) << endl;
      }
    }
  }
  return 0;
}
