#include <bits/stdc++.h>
int main() {
  char xml[1005];
  gets(xml);
  int level = 0;
  for (int i = 0; xml[i]; i++) {
    if (xml[i] == '>' || (xml[i] >= 97 && xml[i] <= 122))
      continue;
    else if (xml[i] == '<' && xml[i + 1] != '/') {
      for (int j = 1; j <= (2 * level); j++) printf(" ");
      printf("<%c>\n", xml[i + 1]);
      level++;
    } else if (xml[i] == '<' && xml[i + 1] == '/') {
      level--;
      for (int j = 1; j <= (2 * level); j++) printf(" ");
      printf("</%c>\n", xml[i + 2]);
    }
  }
  return 0;
}
