#include <bits/stdc++.h>
using namespace std;
int t[100005];
int dp[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &t[i]);
  dp[0] = 20;
  printf("20\n");
  int charged = 20, best;
  int *ptr;
  for (int i = 1; i < n; i++) {
    dp[i] = dp[i - 1] + 20;
    ptr = lower_bound(t, t + n, t[i] - 90 + 1);
    if (ptr - t == 0) {
      dp[i] = min(dp[i], 50);
    } else {
      dp[i] = min(dp[i], 50 + dp[ptr - t - 1]);
    }
    ptr = lower_bound(t, t + n, t[i] - 1440 + 1);
    if (ptr - t == 0) {
      dp[i] = min(dp[i], 120);
    } else {
      dp[i] = min(dp[i], 120 + dp[ptr - t - 1]);
    }
    printf("%d\n", dp[i] - dp[i - 1]);
  }
  return 0;
}
