#include<iostream>
using namespace std;
class Clock
{
private:
int hour,minute,second;
int Ahour,Aminute,Asecond;
public:
Clock(int h=0,int m=0,int s=0)
{
hour=(h>23?0:h);
minute=(m>59?0:m);
second=(s>59?0:s);
}
void SetAlarm(int h,int m,int s)
{
Ahour=(h>23?0:h);
Aminute=(m>59?0:m);
Asecond=(s>59?0:s);
}
void run()
{
second=second+1;
if(second>59)
{
second=0;
minute++;
if(minute>59)
{
minute=0;
hour++;
if(hour>23)
hour=0;
if(hour==Ahour&&minute==Aminute&&second==Asecond)
cout<< "Plink!plink!plink!..."<<endl;
}
}
}
void ShowTime()
{
cout<< "now:"<< hour<<":"<<minute << ":"<<second<<endl;
}
};
int main()
{
Clock Myclock(7,59,57);
Myclock.SetAlarm(8,0,0);
Myclock.ShowTime();
for(int i=0;i<3600*24*3+100;i++)
Myclock.run();
Myclock.ShowTime();
return 0;
}