#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
char a[1010], b[1010];
int h = 0;
int main() {
  scanf("%s", a);
  int l = strlen(a);
  int j = 0;
  for (int i = 0; i < l; i++) {
    b[j++] = a[i];
    if (a[i] == '>') {
      b[j] = 0;
      if (b[1] == '/') h--;
      for (int k = 0; k < 2 * h; k++) putchar(' ');
      if (b[1] != '/') h++;
      puts(b);
      j = 0;
    }
  }
  return 0;
}
