#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, t[maxn];
long long cost[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", t + i);
  for (int i = 1, j = 0, k = 0; i <= n; ++i) {
    while (j + 1 < i && t[i] - t[j + 1] + 1 > 90) j++;
    while (k + 1 < i && t[i] - t[k + 1] + 1 > 1440) k++;
    cost[i] = cost[i - 1] + 20;
    cost[i] = min(cost[i], cost[j] + 50);
    cost[i] = min(cost[i], cost[k] + 120);
    printf("%lld\n", cost[i] - cost[i - 1]);
  }
  return 0;
}
