#include <bits/stdc++.h>
using namespace std;
vector<string> xml;
string end(string start) {
  start.insert(1, "/");
  return start;
}
void print(int i, int j, string prefix = "") {
  if (i >= j) return;
  cout << prefix << xml[i] << endl;
  string closing = end(xml[i]);
  int open = 0;
  int k = i + 1;
  while (xml[k] != closing or open > 0) {
    if (xml[k] == xml[i]) open++;
    if (xml[k] == closing) open--;
    k++;
  }
  string moreprefix = prefix;
  moreprefix.append(2, ' ');
  print(i + 1, k - 1, moreprefix);
  cout << prefix << xml[k] << endl;
  print(k + 1, j, prefix);
}
int main() {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int i = 0, j = 0;
  while (j < s.size()) {
    if (s[j] == '>') {
      xml.push_back(s.substr(i, j - i + 1));
      i = j + 1;
    }
    j++;
  }
  print(0, xml.size() - 1);
  return 0;
}
