#include <bits/stdc++.h>
using namespace std;
char a[1111];
int main() {
  int h = 0, i = 0, j;
  bool isopen = false;
  gets(a);
  while (i < strlen(a) - 1) {
    if (a[i] == '<' && a[i + 1] != '/') {
      if (isopen) h += 2;
      for (j = 0; j < h; j++) printf(" ");
      printf("<");
      i++;
      while (i < strlen(a) && a[i] != '<') printf("%c", a[i]), i++;
      printf("\n");
      isopen = true;
    } else if (a[i] == '<') {
      if (!isopen) h -= 2;
      for (j = 0; j < h; j++) printf(" ");
      printf("<");
      i++;
      while (i < strlen(a) && a[i] != '<') printf("%c", a[i]), i++;
      printf("\n");
      isopen = false;
    }
  }
  return 0;
}
