#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int dp[100005];
int main() {
  int n;
  cin >> n;
  arr[0] = -2000;
  for (long long i = 1; i < n + 1; i++) {
    cin >> arr[i];
    dp[i] = 1e9;
  }
  dp[0] = 0;
  int pay = 0;
  for (long long i = 1; i < n + 1; i++) {
    int x = upper_bound(arr, arr + i, arr[i] - 1) - arr;
    x--;
    dp[i] = min(dp[i], dp[x] + 20);
    x = upper_bound(arr, arr + i, arr[i] - 90) - arr;
    x--;
    dp[i] = min(dp[i], dp[x] + 50);
    x = upper_bound(arr, arr + i, arr[i] - 1440) - arr;
    x--;
    dp[i] = min(dp[i], dp[x] + 120);
    cout << dp[i] - pay << '\n';
    pay = dp[i];
  }
}
