If the item B isn't present in the input list then the new item is inserted at the end of the list.
B