#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long res = 1;
  a %= 1000000007;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
string a, b, c;
int q, n, t;
vector<int> arr;
int brr[1000009];
long long dp[1000009];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  dp[1] = 20;
  arr.push_back(0);
  cin >> t;
  arr.push_back(t);
  for (int i = 2; i <= n; i++) {
    cin >> t;
    arr.push_back(t);
    dp[i] = dp[i - 1] + 20;
    int s90 = lower_bound(arr.begin(), arr.end(), t - 89) - arr.begin();
    if (s90 == 0)
      dp[i] = min(dp[i], dp[s90] + 50);
    else
      dp[i] = min(dp[i], dp[s90 - 1] + 50);
    int s120 = lower_bound(arr.begin(), arr.end(), t - 1439) - arr.begin();
    if (s120 == 0)
      dp[i] = min(dp[i], dp[s120] + 120);
    else
      dp[i] = min(dp[i], dp[s120 - 1] + 120);
  }
  for (int i = 1; i <= n; i++) cout << dp[i] - dp[i - 1] << " ";
}
