#include <bits/stdc++.h>
using namespace std;
char str[1100];
stack<string> st;
string tmp, top;
int main() {
  int i, len;
  int j, sz, out;
  while (scanf("%s", str) != EOF) {
    out = 0;
    tmp.clear();
    len = strlen(str);
    while (!st.empty()) st.pop();
    for (i = 0; i < len; i++) {
      if (str[i] == '>') {
        tmp += str[i];
        sz = st.size();
        if (sz == 0)
          st.push(tmp);
        else {
          if (tmp[1] == '/') {
            st.pop();
            out = 1;
          } else
            st.push(tmp);
        }
        for (j = 0; j < 2 * (sz - out); j++) printf(" ");
        cout << tmp << endl;
        out = 0;
        tmp.clear();
        continue;
      }
      tmp += str[i];
    }
  }
  return 0;
}
