Hello everyone. I'm new to excel and to this forum and I hope someone can help me with the right formula
I have these to lists, A & B.

A B
1010 1012
5340 1330
6411 5470
8888 8451
9003
9577
-------------------------------------

I need to input a value below. The formula I need will search the two lists above and tells me in which list the value is. It will return "A" or "B". and if I input a number that's not in either list the cell stays blank. It would stay blank if there is no input value as well.

input List
1012 B
8888 A
(empty) (empty)
7777 (empty)

Can anyone help please