#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
int inf = 2e9;
long long INF = 8e18;
int t[200000];
int dp[200000];
int bs(int x, int s, int e) {
  if (s == e) {
    return s;
  }
  int mid = (s + e + 1) / 2;
  if (t[mid] > x) {
    return bs(x, s, mid - 1);
  }
  return bs(x, mid, e);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n;
  cin >> n;
  t[0] = -inf;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
  }
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = inf;
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = min(dp[i], dp[i - 1] + 20);
    dp[i] = min(dp[i], dp[bs(t[i] - 90, 0, n)] + 50);
    dp[i] = min(dp[i], dp[bs(t[i] - 1440, 0, n)] + 120);
    cout << dp[i] - dp[i - 1] << "\n";
  }
  return 0;
}
