#include <bits/stdc++.h>
using namespace std;
string str;
stack<int> st;
int main() {
  int n, h = 0, k, flag = 0;
  cin >> str;
  n = str.length();
  for (int i = 0; i < n; i += k) {
    if (str[i + 1] == '/') {
      k = 4;
      if (flag)
        flag = 0;
      else
        h--;
    } else {
      if (!flag)
        flag = 1;
      else
        h++;
      k = 3;
    }
    for (int j = 0; j < 2 * h; j++) printf(" ");
    for (int j = i; j < i + k; j++) printf("%c", str[j]);
    printf("\n");
  }
  return 0;
}
