Solve grid problem from wildcard.