#include <bits/stdc++.h>
using namespace std;
const int MN = 101010, MVAL = 1010101010;
int dp[MN];
int t[MN];
int main() {
  int n, pre, cost, i;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%d", t + i);
  for (i = 0; i < n; ++i) dp[i] = MVAL;
  for (i = 0; i < n; ++i) {
    cost = 20;
    if (i != 0) cost += dp[i - 1];
    dp[i] = min(dp[i], cost);
    pre = lower_bound(t, t + n, t[i] - 90 + 1) - t;
    cost = 50;
    if (pre != 0) cost += dp[pre - 1];
    dp[i] = min(dp[i], cost);
    pre = lower_bound(t, t + n, t[i] - 1440 + 1) - t;
    cost = 120;
    if (pre != 0) cost += dp[pre - 1];
    dp[i] = min(dp[i], cost);
  }
  printf("%d\n", dp[0]);
  for (i = 1; i < n; ++i) printf("%d\n", dp[i] - dp[i - 1]);
  return 0;
}
