#include #include using namespace std; int main() { int n; cin >> n; vector v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int sort_round = 0; sort_round < n - 1; sort_round++) { for (int i = 0; i <= n - 2 - sort_round; i++) { if (v[i] > v[i + 1]) { swap(v[i], v[i + 1]); } } } for (int i = 0; i < n; i++) { cout << v[i] << ' '; } return 0; }