How to extract specific information?

hi, i have a file A like this:

******************* No 2823 ********************
contig15205-
                    G383C4U02H4G80+ is in contig15205-
                    G383C4U02HGLXM- is in contig15205-
                    G383C4U01C3HIZ+ is in contig15205-
                    G383C4U02HDLAB+ is in contig15205-
                    G383C4U01DVIXN+ is in contig15205-
                    G383C4U01AT850+ is in contig15205-
                    G383C4U01AVD5W- is in contig15205-
                    G383C4U02JAADO- is in contig15205-
                    G383C4U01ETXWQ+ is in contig15205-
                    G383C4U02GH68R- is in contig15205-
                    G383C4U01A59A3- is in G383C4U02GH68R-
                    G383C4U02HQGV3+ is in contig15205-
                    G383C4U01BJG92- is in contig15205-
                    G383C4U02JP8KO+ is in contig15205-
                    G383C4U02HZI67- is in contig15205-
******************* Con 2824 ********************
contig15207-
                    G383C4U01DJJKO+ is in contig15207-
                    G24KUME16J2AZZ+ is in contig15207-
                    G383C4U02HECZI- is in contig15207-
                    G383C4U02F2S43+ is in contig15207-
G383C4U01AQEWM+
******************* Single 2825 ********************
contig15209+
                    G383C4U01E15DK+ is in contig15209+
                    G383C4U02FZUMZ- is in contig15209+
                    G383C4U01EMTPI- is in contig15209+
                    G383C4U01C3ZHB- is in contig15209+
                    G383C4U02I7359+ is in contig15209+
                    G383C4U01AEZA8+ is in contig15209+
******************* Contig 2826 ********************
contig15210+

......

And i have a file B containing the key ids i want, like this:

No 2823
Con 2824

How can i a get a file contain only the detailed information for each key id of interest?

Is this a homework assignment?

What have you tried?

Are keys always two "words" where the 1st word is alphabetic and the second word is numeric?

Can a key given in file B appear more than once in file A?

Please show us the output your are hoping to get.

hi, this is not a homework. This is related to my bioinformatics research. I do not know how to programming.

The key in B file appear twice in file A.

This site is not a place where you can get volunteers to act as your unpaid programming staff! We are here to help you learn how to write your own programs...

I repeat:
What have you tried?

Are keys always two "words" where the 1st word is alphabetic and the second word is numeric?

Please show us the output your are hoping to get from the sample input you provided.