#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long int arr[100005];
long long int cum[100005];
int main() {
  long long int n;
  scanf("%lld", &n);
  scanf("%lld", &arr[0]);
  printf("20\n");
  cum[0] = 20;
  for (int i = 1; i < n; i++) {
    scanf("%lld", &arr[i]);
    int idx1 = lower_bound(arr, arr + i + 1, arr[i] - 90 + 1) - arr;
    int idx2 = lower_bound(arr, arr + i + 1, arr[i] - 1440 + 1) - arr;
    long long int val1;
    if (idx1 != 0)
      val1 = 50 - (cum[i - 1] - cum[idx1 - 1]);
    else
      val1 = 50 - cum[i - 1];
    long long int val2;
    if (idx2 != 0)
      val2 = 120 - (cum[i - 1] - cum[idx2 - 1]);
    else
      val2 = 120 - cum[i - 1];
    long long int first = min((long long int)20, min(val1, val2));
    printf("%lld\n", first);
    cum[i] = first + cum[i - 1];
  }
  return 0;
}
