#include <stdio.h>#include <stdlib.h>
int main() { int i,n; while(scanf("%d",&n)!=EOF){ for(i=1;i<n;i++){ if(i%7==0)continue; printf("%d ",i); } printf("\n"); } return 0;}