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