Long range ordering in the graphite intercalation compounds