/*
 * This template is valid both in C and in C++,
 * so you can expand it with code from both languages.
 */

#include <assert.h>
#include <stdbool.h>
#include <stdio.h>

// constraints
#define MAXN 100+5

// input data
int N, M, x, y, K, i, j;
int gifts[MAXN][MAXN];

int main() {
  //  uncomment the following lines if you want to read/write from files
  //  freopen("input.txt", "r", stdin);
  //  freopen("output.txt", "w", stdout);

  assert(5 == scanf("%d %d %d %d %d", &N, &M, &x, &y, &K));
  for (i = 1; i <= N; i++) {
    for (j = 1; j <= M; j++) {
      assert(1 == scanf("%d", &gifts[i][j]));
    }
  }

  // insert your code here

  printf("%lld\n", 42);  // change 42 with actual answer
  return 0;
}
