#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
const long long INF = 1e18;
long long power(long long x, long long y) {
  long long t = 1;
  while (y > 0) {
    if (y % 2)
      y -= 1, t = t * x % mod;
    else
      y /= 2, x = x * x % mod;
  }
  return t;
}
long long dp[N];
long long arr[N], ans[N];
int main() {
  int n;
  scanf("%d", &n);
  arr[0] = -10000;
  int c1 = 0, c2 = 0;
  long long pd = 0;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%lld", &arr[i + 1]);
    dp[i + 1] = dp[i] + 20;
    while (arr[i + 1] - arr[c1] >= 90) c1++;
    while (arr[i + 1] - arr[c2] >= 1440) c2++;
    dp[i + 1] = min(dp[i + 1], dp[c1 - 1] + 50);
    dp[i + 1] = min(dp[i + 1], dp[c2 - 1] + 120);
    ans[i] = dp[i + 1] - dp[i];
  }
  for (int i = 0; i < n; ++i) printf("%lld\n", ans[i]);
  return 0;
}
