#include <string.h>

//--------------------------------------------------------------------------
class string { // Yksinkertainen string-luokka joka korvataan paremmalla
  char cstr[81];
public:
  string()                          { cstr[0] = 0;                      }
  string(const char *alustus)       { copy(alustus);                    }
  string &operator=(string &s2)     { if ( this != &s2 ) copy(s2.cstr);
                                      return *this;                     }
  string &operator=(const char *s2) { copy(s2); return *this;           }
  void copy(const char *s2)         { strncpy(cstr,s2,sizeof(cstr));
                                      cstr[sizeof(cstr)-1] = 0;         }
  friend ostream &operator<<(ostream &os,const string &s);
};

ostream &operator<<(ostream &os,const string &s)
{
  os << s.cstr;
  return os;
}