Nanomaterials based on high-melting carbides, nitrides and borides