#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, j;
  char ch1, ch2, s[1005];
  scanf("%s", s);
  n = strlen(s);
  k = -1;
  i = 0;
  while (s[i]) {
    if (s[i + 1] == '/') {
      for (j = 1; j <= 2 * k; j++) printf(" ");
      k--;
      printf("%c", s[i++]);
      printf("%c", s[i++]);
      printf("%c", s[i]);
    } else {
      k++;
      for (j = 1; j <= 2 * k; j++) printf(" ");
      printf("%c", s[i++]);
      printf("%c", s[i]);
    }
    printf("%c\n", s[++i]);
    i++;
  }
}
