#include <bits/stdc++.h>
int n;
int t[(100010)], dp[(100010)];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", t + i);
  }
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + 20;
    int j1 = std::lower_bound(t + 1, i + t, t[i] - 89) - t - 1;
    int j2 = std::lower_bound(t + 1, i + t, t[i] - 1439) - t - 1;
    dp[i] = std::min(dp[i], dp[j1] + 50);
    dp[i] = std::min(dp[i], dp[j2] + 120);
    printf("%d\n", dp[i] - dp[i - 1]);
  }
  return 0;
}
