#include <cstdio>
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <tuple>
#include <assert.h>
#include <deque>
#include <bitset>
#include <iomanip>
#include <limits>
#include <chrono>
#include <random>
#include <array>
#include <unordered_map>
#include <functional>
#include <complex>

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

constexpr long long MAX = 5100000;
constexpr long long INF = 1LL << 60;
constexpr int inf = 1 << 28;
constexpr long long mod = 1000000007LL;
//constexpr long long mod = 998244353LL;

using namespace std;
typedef unsigned long long ull;
typedef long long ll;

int main()
{
	/*
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	*/
	int kkt = 89;
	while (kkt) {
		ll N, M; scanf("%lld %lld", &N, &M); if (N == 0 && M == 0) break;
		vector<pair<ll, int>> score(N); for (int i = 0; i < N; i++) score[i].second = i;
		vector<pair<ll, int>> mn(N); for (int i = 0; i < N; i++) mn[i].second = i;
		for (int i = 0; i < M; i++) {
			ll s; scanf("%lld", &s);
			ll k; scanf("%lld", &k);
			if (k == 1) {
				ll x; scanf("%lld", &x);
				x--;
				score[x].first += s;
				mn[x].first += s;
			}
			else {
				for (int j = 0; j < k; j++) {
					ll x; scanf("%lld", &x);
					x--;
					score[x].first += s;
				}
			}
		}
		sort(score.rbegin(), score.rend());
		sort(mn.begin(), mn.end());
		if (score[0].second != mn[0].second) {
			cout << score[0].first - mn[0].first + 1<< "\n";
		}
		else {
			cout << max(score[0].first - mn[1].first, score[1].first - mn[0].first) + 1 << "\n";
		}
	}
	return 0;

}
