#include <bits/stdc++.h>
using namespace std;
const int maxN = (1e5) + 18;
int n, dp[5][maxN], F[maxN], P[maxN], sumP[maxN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int l = 1, r = i, mid, c, minI;
    cin >> F[i];
    P[i] = 20;
    if (F[i] < 90)
      P[i] = min(P[i], 50 - sumP[i - 1]);
    else {
      c = F[i] - 90 + 1;
      minI = maxN;
      while (l <= r) {
        mid = (l + r) / 2;
        if (F[mid] >= c) {
          if (minI > mid) minI = mid;
          r = mid - 1;
        } else
          l = mid + 1;
      }
      if (minI != maxN) P[i] = min(P[i], 50 - (sumP[i - 1] - sumP[minI - 1]));
    }
    l = 1;
    r = i;
    if (F[i] < 1440)
      P[i] = min(P[i], 120 - sumP[i - 1]);
    else {
      c = F[i] - 1440 + 1;
      minI = maxN;
      while (l <= r) {
        mid = (l + r) / 2;
        if (F[mid] >= c) {
          if (minI > mid) minI = mid;
          r = mid - 1;
        } else
          l = mid + 1;
      }
      if (minI != maxN) P[i] = min(P[i], 120 - (sumP[i - 1] - sumP[minI - 1]));
    }
    cout << P[i] << endl;
    sumP[i] = sumP[i - 1] + P[i];
  }
  return 0;
}
