#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int i, j;
  int n;
  cin >> n;
  ;
  vector<long long> arr(n);
  for (i = 0; i < n; i++) cin >> arr[i];
  vector<long long> dp(n, 1e15);
  dp[0] = 20;
  cout << 20 << '\n';
  for (i = 1; i < n; i++) {
    dp[i] = dp[i - 1] + 20;
    int ind =
        lower_bound((arr).begin(), (arr).end(), arr[i] - 89) - arr.begin() - 1;
    if (ind < 0)
      dp[i] = min(dp[i], 50LL);
    else
      dp[i] = min(dp[i], dp[ind] + 50);
    ind = lower_bound((arr).begin(), (arr).end(), arr[i] - 1439) - arr.begin() -
          1;
    if (ind < 0)
      dp[i] = min(dp[i], 120LL);
    else
      dp[i] = min(dp[i], dp[ind] + 120);
    cout << dp[i] - dp[i - 1] << '\n';
  }
}
