I have a list of ID numbers that either have one row or data or two (A and/or P). Then there is a score % given which has an 'n' size. What I need is a list of unique IDs only that has the highest % returned, but if there are multiple rows, then ONLY IF the corresponding 'n' is 30 or greater. Leaving the values without a n>29 is fine if the ID only has one row (as in the last example 444).

To recap the logic:
One row returned for each ID
Highest % returned unless it has an 'n' <30 and an additional row has a corresponding ID with lower percent but has a 'n'>=30
Carrying over the n and A/P value will be needed too.

Example (ID in Column A):
ID % n A/P
111 75 4 A
111 23 32 P
222 88 41 P
333 11 50 A
333 22 40 P
444 90 6 A

Want returned:
ID % n A/P
111 23 32 P
222 88 41 P
333 22 40 P
444 90 6 A

Thank you.