#include <bits/stdc++.h>
using namespace std;
#define int long long
int P = 1000000007;
#define F first
#define S second
#define pb push_back
#define mp make_pair

void solve () {
	int a, b; cin >> a >> b;
	int sum=0;
	if (a>=b) {
		for (int i=1; i<=a; ++i) {cout << i << " ";}
		for (int i=1; i<b; ++i) {cout << -i << " ";}
		cout << b*(b-1)/2-a*(a+1)/2;
	}
	else {
		for (int i=1; i<=b; ++i) {cout << -i << " ";};
		for (int i=1; i<a; ++i) {cout << i << " ";}
		cout << b*(b+1)/2-a*(a-1)/2;
	}
}

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
	    freopen("input.txt", "r", stdin);
	    freopen("output.txt", "w", stdout);
	#endif
    int t = 1;
    // cin >> t;
    for (int _t=0; _t<t;++_t) {
        // cout << "Case #" << _t+1 << ": ";
        solve();
    }
}
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
signed main()
{
    vector<int>v;
    int n,x;
    cin>>n>>x;
    int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]!=x)
            v.push_back(a[i]);
    }
    if(v.size()==0)
        cout<<""<<endl;
    else
    {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
    }
}

