#include <iostream>
#include <fstream>
using namespace std;



int main()
{
  ifstream in("superflake.txt");
  ofstream out("spheres.xml");
  
  
  double x=0,y=0,z=0,r=0;
  unsigned i=0;


  /*
         20 20



  */


  while(in >> x >> y >> z >> r)
  {
    i++;
    i%=5;
    out << "<sphere position=\"";
    out << 30*x + 600 << ' ' << 30*y + 500 << ' '  << 30*z;
    out << "\" radius=\"" << 25*r;
    out << "\" idMat=\"" << i + 1 ;
    out << "\" />" << endl;
  }

  in.close();
  out.close();


}
