Matrix with spiral increasing values
Covering what others suggested (e.g. @Srivaths), please follow at least PEP8 Python PEP8

Then, put your code in some function.
Give meaningful names to variables. (What's a, c, x, z ... why are you not using b? )

You don't need import math -- instead of f=row/2
f=math.ceil(f), you can do f = row // 2 (assuming you use python 3). 

Note that you can solve the problem more generally, for m x n matrix, which you can initialize as:
matrix = [[0 for col in range(nCols)] for row in range(nRows)]
(see the answer from StackOverflow, provided by @OK).
This
 matrix = [[0] * m] * n, as pointed in the comments, won't work because of list references.

Now, we can also observe that you can fill the "outer rectangle", i.e. matrix[0][:] = range(1, nCols + 1); then, you can fill the rightmost column 

cnt += nCols
for row in range(1, nRows):
  matrix[row][rightIdx] = cnt
  cnt += 1
# Bottom row:
matrix[bottomIdx][leftIdx:] = reversed(range(cnt, cnt + nCols - 1) # might be off by 1;
# Complete first column

# Put this in a while loop;


This problem is similar -- once you have the matrix, print it in a spiral order:
Geeks for geeks website.

Also, you can check the solution of LeetCode Prob 54, but I would encourage you to try solving the problem yourself first.
Problem 54 Solution for Problem 54

And here is my solution to Problem 54, similar to Solution 2 (Leetcode Solution link above): My solution :)