#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 7;
long long dp[N];
long long a[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  dp[0] = 0ll;
  a[0] = 0ll;
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + 20ll;
    int l = 0, r = i - 1, ans = i - 1;
    long long left = max(a[i] - 89ll, 0ll);
    while (l <= r) {
      int m = (r + l) >> 1;
      if (a[m] >= left)
        ans = m, r = m - 1;
      else
        l = m + 1;
    }
    dp[i] = min(dp[i], dp[max(ans - 1, 0)] + 50ll);
    l = 0, r = i - 1, ans = i - 1;
    left = max(a[i] - 1439ll, 0ll);
    while (l <= r) {
      int m = (r + l) >> 1;
      if (a[m] >= left)
        ans = m, r = m - 1;
      else
        l = m + 1;
    }
    dp[i] = min(dp[i], dp[max(ans - 1, 0)] + 120ll);
    cout << dp[i] - dp[i - 1] << '\n';
  }
  return 0;
}
