a bright idea suddenly occurs (idiom); to hit upon an inspiration
Turn 灵机一动 into a printable worksheet PDF with Tianzige practice grids and pinyin.