#include <bits/stdc++.h>
using namespace std;
string s, t;
vector<string> tags;
int n, k = 0;
vector<int> d(1000);
vector<string> st;
void print() {
  for (int i = 0; i < k - 1; i++) cout << "  ";
}
int main() {
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] != '>') {
      t.push_back(s[i]);
    } else {
      t.push_back(s[i]);
      tags.push_back(t);
      t = "";
    }
  }
  for (int i = 0; i < tags.size(); i++) {
    if (tags[i][1] != '/') {
      k++;
      print();
    } else {
      print();
      k--;
    }
    cout << tags[i] << endl;
  }
  return 0;
}
