Graphite synthesis for batteries and fuel cells