#include <bits/stdc++.h>
using namespace std;
int seen[100];
char data[10000000];
int main() {
  int cur = 0;
  cin >> data;
  int n = strlen(data);
  for (int i = 0; i < n; i++) {
    if (isalpha(data[i])) {
      if (seen[data[i] - 'a'] && data[i - 1] == '/') {
        cur--;
      }
      for (int j = 0; j < cur * 2; j++) {
        cout << ' ';
      }
      cout << '<';
      if (seen[data[i] - 'a'] && data[i - 1] == '/') {
        cout << '/';
        seen[data[i] - 'a']--;
      } else if (data[i - 1] != '/') {
        seen[data[i] - 'a']++;
        cur++;
      }
      cout << data[i] << ">\n";
    }
  }
  return 0;
}
