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