Write and read mappings.