#include <bits/stdc++.h>
using namespace std;
const long long int N = 300009;
const long long int mod = 1000000007;
void pre() {}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin.exceptions(cin.failbit);
  ;
  pre();
  long long int n;
  cin >> n;
  vector<long long int> a(n + 1, -INT_MAX), dp(n + 1, 0), ans(n);
  for (long long int i = 0; i < (n); ++i) cin >> a[i + 1];
  for (long long int i = 1; i < (n + 1); ++i) {
    dp[i] = dp[i - 1] + 20;
    auto it = lower_bound(a.begin(), a.end(), a[i] - 89);
    long long int numi = it - a.begin();
    dp[i] = min(dp[i], dp[numi - 1] + 50);
    auto itr = lower_bound(a.begin(), a.end(), a[i] - 1439);
    long long int numii = itr - a.begin();
    dp[i] = min(dp[i], dp[numii - 1] + 120);
    ans[i - 1] = dp[i] - dp[i - 1];
  }
  for (auto& it : ans) cout << it << "\n";
  return 0;
}
