#include <bits/stdc++.h>
using namespace std;
char XML[1024];
int n, len;
void parse(int h) {
  if (n >= len) return;
  int idx = n;
  for (__typeof(len) i = (n); i <= (len); i += 1) {
    if (XML[i] == '<') {
      idx = i;
      break;
    }
  }
  if (XML[idx + 1] == '/') {
    n += 4;
    for (__typeof(2 * (h - 1) - 1) i = (0); i <= (2 * (h - 1) - 1); i += 1)
      cout << " ";
    printf("</%c>\n", XML[idx + 2]);
    parse(h - 1);
  } else {
    for (__typeof(2 * h - 1) i = (0); i <= (2 * h - 1); i += 1) cout << " ";
    printf("<%c>\n", XML[idx + 1]);
    n += 3;
    parse(h + 1);
  }
}
int main() {
  scanf("%s", XML);
  while (XML[len] != 0) len++;
  parse(0);
  return 0;
}
