#include <bits/stdc++.h>
using namespace std;
void print_space(int k) {
  for (int i = 0; i < (2 * k); i++) {
    cout << " ";
  }
  return;
}
int main() {
  string s;
  cin >> s;
  int k = 0;
  for (int i = 0; i < s.size(); i++) {
    i++;
    string xx;
    while (s[i] != '>') {
      xx += s[i];
      i++;
    }
    if (xx[0] != '/') {
      print_space(k++);
    } else {
      print_space(--k);
    }
    cout << "<" << xx << ">" << endl;
  }
  scanf(" ");
  return 0;
}
