#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100005], sa = 0, b = 0, x;
  scanf("%d", &n);
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int dp[100005] = {0, 20};
  printf("20\n");
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + 20;
    int x, y = upper_bound(a, a + i, a[i] - 90) - a - 1;
    x = dp[y] + 50;
    y = upper_bound(a, a + i, a[i] - 1440) - a - 1;
    x = min(x, dp[y] + 120);
    dp[i] = min(dp[i], x);
    printf("%d\n", dp[i] - dp[i - 1]);
  }
}
