#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5, mod = 1e9 + 7, mod1 = 998244353, mod2 = 1e9 + 9,
                inf = 1e9 + 7;
const long long infll = 1e18 + 7;
long long n;
long long a[N];
long long dp[N];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    long long tmp1 = 20 + dp[i - 1];
    long long tmp2 = 50 + dp[lower_bound(a + 1, a + 1 + n, a[i] - 89) - a - 1];
    long long tmp3 =
        120 + dp[lower_bound(a + 1, a + 1 + n, a[i] - 1439) - a - 1];
    dp[i] = min(min(tmp1, tmp2), tmp3);
    cout << dp[i] - dp[i - 1] << '\n';
  }
}
