you work as a younger specialist in the digital archive. Your task & mdash; Create an assistant program for the cataloging of ancient artifacts. Each artifact has a unique numerical identifier (ID) and name.
rn
the program should be interactive and work in the cycle, expecting the commands from you.
rn
program commands:
rn
add & nbsp; & mdash; triggers the process of adding a new artifact. The program will request from you data in the & nbsp; "id: name" . You must make sure that the ID is an entire number. If the input format is incorrect (for example, there is no colon or ID is not a number), the program must report an error and request entry again until the correct data is entered. rn
list & nbsp; & mdash; It displays on the screen the current list of all added artifacts in the order in which they were added. rn
sort & nbsp; & mdash; Carries out the sorting of all artifacts by increasing their ID. For sorting, it is necessary to use & nbsp; bubble sorting algorithm . After the sorting, the program should inform about success. rn
exit & nbsp; & mdash; completes the work of the program. rn ol> rn
your goal & mdash; Write a program that correctly processes all the commands, controls the list of artifacts and correctly implements bubble sorting so that the senior archivist can easily navigate the catalog.
Input format
The user team (line). It can be one of: & nbsp; Add , & nbsp; List of , & nbsp; sort , & nbsp; output .
If the command & nbsp; add , then the entry of data on artifact (line) in the & nbsp; id: name . ID should imagine in the form of a whole number.
Output format
The answers of the program to the commands, error messages, a sorted or unfinished list of artifacts (lines).
Example
Input
Add
30: Shield
Add
10: Sword
Sort
List
Exit
Output
The artifact is successfully added.
The artifact has been successfully added.
The archive is successfully sorted by ID.
--- Catalog of artifacts ---
id: 10, name: sword
id: 30, name
-------------------- Programs. Goodbye!
Hint
There will be no clue here, decide for yourself!