#include <bits/stdc++.h>
using namespace std;
int n, i, p1, p2, m, a[100005], dp[100005];
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    while (a[i] - a[p1] >= 90) p1++;
    while (a[i] - a[p2] >= 1440) p2++;
    m = dp[i - 1] + 20;
    if (m > dp[p1 - 1] + 50) m = dp[p1 - 1] + 50;
    if (m > dp[p2 - 1] + 120) m = dp[p2 - 1] + 120;
    dp[i] = m;
    printf("%d\n", dp[i] - dp[i - 1]);
  }
  return 0;
}
