#include <bits/stdc++.h>
using namespace std;
const int N = 1024;
char str[N];
stack<string> sta;
string tmp;
int main() {
  while (scanf("%s", str) == 1) {
    int ind = 0, len = strlen(str), cur = 0;
    while (ind < len) {
      ind++;
      tmp = "";
      for (int i = ind; str[i] != '>'; i++) tmp += str[i], ind++;
      ind++;
      if (tmp[0] == '/') {
        cur--;
        for (int i = 0; i < 2 * cur; i++) cout << " ";
        cout << "<" << tmp << ">" << endl;
      } else {
        for (int i = 0; i < 2 * cur; i++) cout << " ";
        cout << "<" << tmp << ">" << endl;
        cur++;
      }
    }
  }
  return 0;
}
