#!/bin/bash
mc=$1
n=$(cat ${mc} | grep " " | wc -l)
case $n in
	16) l=2 ; hd=XYZ.L2.head ;;
	64) l=4 ; hd=XYZ.L4.head ;;
	144) l=6 ; hd=XYZ.L6.head ;;
	256) l=8 ; hd=XYZ.L8.head ;;
        400) l=10 ; hd=XYZ.L10.head ;;
        576) l=12 ; hd=XYZ.L12.head ;;
esac
xyz=$2
./mc2xyz.py $l $mc | cat $hd - > $xyz
