Brazil and Germany prepare for closer ties