#include <cmath>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(int argc, char** argv)
{
int T;
cin >> T;
string sResult="";
for (int i = 1; i <= T; i++)
{
string sTemp = to_string(i);
int iCnt = 0;
for (int j = 0; j < sTemp.size(); j++)
{
if (sTemp[j] == '3' || sTemp[j] == '6' || sTemp[j] == '9')
{
iCnt++;
}
}
if (iCnt > 0)
{
string sTemp1 = "";
for (int k = 0; k < iCnt; k++)
{
sTemp1 += "-";
}
sResult += sTemp1;
}
else
{
sResult += sTemp;
}
sResult += " ";
}
cout << sResult;
return 0;
}
3 6 9 내부에 여러번있을때 - 여러개 합치는부분 있음