Sahaduna, I assume the memory was working before you replaced the CPU thermal paste. Mixing different DIMMs (8GB, 4GB, and 2GB) does not give the best memory performance, but it should work, and if it was working before, then something happened to your Z400.
The memory controller is in the Z400 CPU. Did you remove the CPU from the socket when replacing the paste? It is easy to bend CPU socket pins removing and installing the CPU, especially if the CPU was not installed flat (i.e., not inserted tilted into the CPU socket). A bent pin could cause memory errors.
Try reseating the CPU, and look carefully into the CPU socket for any bent pins or debris in the socket. Grab the CPU from both sides, and lift it straight up when removing it, and hold it flat and put it down (gently) into the CPU socket when installing. Do not tilt the CPU and put an edge into the socket (to align the CPU), then drop the other edge. This can bend pins.