#include <bits/stdc++.h>
using namespace std;
int dp[100005];
int trip[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &trip[i]);
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + 20;
    for (int j = i - 1; j > 0; j--) {
      if (trip[i] - trip[j] < 90)
        dp[i] = min(dp[i], dp[j - 1] + 50);
      else if (trip[i] - trip[j] < 1440)
        dp[i] = min(dp[i], dp[j - 1] + 120);
      else
        break;
    }
    cout << dp[i] - dp[i - 1] << endl;
  }
  return 0;
}
