#include <bits/stdc++.h>
using namespace std;
int spaces[1000];
int main() {
  string s;
  cin >> s;
  vector<string> xml;
  string curr = "";
  int level = 0;
  int t = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '<') {
      curr = "";
      while (s[i + 1] != '>') {
        i++;
        curr += s[i];
      }
      if (curr[0] == '/') {
        spaces[level] = -1;
        xml.push_back(curr);
        level++;
      } else {
        spaces[level] = 1;
        xml.push_back(curr);
        level++;
      }
    }
  }
  int spac = 0;
  for (int j = 0; j < xml.size(); j++) {
    if (spaces[j] == -1) spac--;
    for (int k = 0; k < spac; k++) cout << "  ";
    if (spaces[j] == -1)
      cout << "<" << xml[j] << ">" << endl;
    else {
      cout << "<" << xml[j] << ">" << endl;
      spac++;
    }
  }
}
