#include <bits/stdc++.h>
int main() {
  int uz;
  char s[1005];
  scanf("%s", s);
  uz = strlen(s);
  int x = -1;
  for (int i = 0; i < uz; i++) {
    if (s[i] == '<' || s[i] == '>') continue;
    if (s[i] == '/') {
      for (int t = 0; t < x; t++) printf("  ");
      printf("</%c>\n", s[i + 1]);
      x--;
      i++;
      continue;
    }
    x++;
    for (int t = 0; t < x; t++) printf("  ");
    printf("<%c>\n", s[i]);
  }
  return 0;
}
