#include <bits/stdc++.h>
char s[1000 + 1];
int main() {
  scanf("%s", s);
  int i = 0, level = 0;
  char *t = s;
  while (*t != 0) {
    ++t;
    if (*t == '/') {
      --level;
      for (int j = 0; j < level; ++j) printf("  ");
      printf("</%c>\n", *(++t));
    } else {
      for (int j = 0; j < level; ++j) printf("  ");
      printf("<%c>\n", *t);
      ++level;
    }
    ++ ++t;
  }
  return 0;
}
