#include <bits/stdc++.h>
int main() {
  char s[1000];
  int i, h, l, j, level = -1;
  scanf("%s", s);
  l = strlen(s);
  for (i = 0; i < l;) {
    if ((s[i] == '<') && (s[i + 1] >= 97) && (s[i + 1] <= 122)) {
      level++;
      h = 2 * level;
      for (j = 0; j < h; j++) printf(" ");
      printf("<%c>\n", s[i + 1]);
      i = i + 3;
    } else if ((s[i] == '<') && (s[i + 1] == '/')) {
      h = 2 * (level--);
      for (j = 0; j < h; j++) printf(" ");
      printf("</%c>\n", s[i + 2]);
      i = i + 4;
    }
  }
  return 0;
}
