Understand the question first. Valid means filled part is valid, we need not care the empty part.