#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<stack>
#include<queue>
#include<string>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;(i)<(n);(i)++)
#define FOR(i,m,n) for(int i=(m);(i)<(n);(i)++)
#define All(v) (v).begin(),(v).end()
#define MP make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int INF = 1<<30;
const ll LINF = 1LL<<61;
const int MOD = 1e9+7;

int main(){
    int N, M;
    while(cin >> N >> M,N|M){
        vector<int> score(M);
        vector<vector<int>> cood(M,vector<int>());
        for (int i = 0;i<M;i++){
            cin >> score[i];
            int k;cin >> k;
            for (int j = 0; j < k;j++){
                int a;
                cin >> a;
                a--;
                cood[i].push_back(a);
            }
        }
        
        vector<pair<int,int>> minscore(N),maxscore(N);
        for (int i = 0;i<N;i++){
            minscore[i].second = i+1;
            maxscore[i].second = i + 1;
        }
        for (int i = 0; i < M; i++)
        {
            for (auto c : cood[i])
            {
                if (cood[i].size() == 1)
                {
                    minscore[c].first += score[i];
                    maxscore[c].first += score[i];
                }
                else
                {
                    maxscore[c].first += score[i];
                }
            }
        }
            
        sort(minscore.begin(),minscore.end());
        sort(maxscore.rbegin(),maxscore.rend());
        int res = -1;
        for (int i = 0; i < N; i++)
        {
            int ma = maxscore[i].first;
            int mi = minscore[0].first;
            if (minscore[0].second == maxscore[i].second)
                mi = minscore[1].first;
            res = max(ma - mi + 1, res);
        }
        cout << res << endl;
    }
    return 0;
}
