package main import "fmt" func main() { var a, b int _, _ = fmt.Scan(&a, &b) for i := 0; i < b; i++ { stop := a if stop >= 4 { stop = 4 } for j := 0; j <= stop; j++ { p := i*5 + j if p > 0 { fmt.Println(p) } } } for j := 0; j <= a; j++ { fmt.Println(5*b + j) } }