#include <bits/stdc++.h>
using namespace std;
char* gao(char* s, int lv = 0) {
  while (*s) {
    if (s[1] != '/') {
      for (int i = 0; i < lv; i++) printf("  ");
      printf("<%c>\n", s[1]);
      s = gao(s + 3, lv + 1);
    } else {
      for (int i = 1; i < lv; i++) printf("  ");
      printf("</%c>\n", s[2]);
      return s + 3;
    }
    s++;
  }
  return s;
}
int main() {
  char s[1010];
  gao(gets(s));
}
