#include <bits/stdc++.h>
using namespace std;
int dp[1000000];
int t[1000000];
int main() {
  srand(179);
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  ;
  for (int i = 0; i < n; ++i) {
    cin >> t[i + 1];
  }
  dp[0] = 0;
  for (int i = 1; i <= n; ++i) dp[i] = 1e9;
  for (int i = 1; i <= n; ++i) {
    dp[i] = min(dp[i], dp[i - 1] + 20);
    dp[i] =
        min(dp[i], dp[lower_bound(t + 1, t + n + 1, t[i] - 89) - t - 1] + 50);
    dp[i] = min(dp[i],
                dp[lower_bound(t + 1, t + n + 1, t[i] - 1439) - t - 1] + 120);
  }
  for (int i = n - 1; i > 0; --i) {
  }
  for (int i = 1; i <= n; ++i) {
    cout << dp[i] - dp[i - 1] << " ";
  }
}
