#include <iostream>
#include <map>
using namespace std;
int main(){
typedef multimap<int, char, less<int>> M;
M m1;
m1.insert(M::value_type(2,'B'));
m1.insert(M::value_type(3,'C'));
m1.insert(M::value_type(1,'A'));
m1.insert(M::value_type(1,'a'));
M::iterator it = m1.begin();
cout << "m1:" << endl;
while (it != m1.end()){
cout << it->first << "-" << it->second << endl;
it++;
}
M m2(m1);
it = m2.begin();
cout << "m2:" << endl;
while (it != m2.end()){
cout << it->first << "-" << it->second << endl;
it++;
}
cout << "m3:" << endl;
M m3(m2.begin(), m2.end());
it = m3.begin();
while (it != m3.end()){
cout << it->first << "-" << it->second << endl;
it++;
}
return 0;
}