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