#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vecll = vector<long long>;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define all(n) (n).begin(), (n).end()

int main()
{
    ll n, k, mask=0, b;
    cin >> n >> k;
    rep(i, k)
    {
        cin >> b;
        mask |= (1LL << b);
    }

    for (ll bit=0; bit < (1LL<<n); bit++)
    {
        vector<ll> S;
        if ((bit&mask)==bit)
        {
            for (ll i=0; i < n; i++)
            {
                if (bit & (1LL << i))
                {
                    S.push_back(i);
                }
            }

            cout << bit << ":";
            for (ll i=0;i<(ll)(S.size());i++)
            {
                cout << " " << S[i];
            }
            cout << endl;
        }
    }

}
