The present invention relates to compounds of formula I wherein R toR and G are as defined in the description and claims and pharmaceutically acceptablesalts thereof. The compounds are useful for the treatment and/or preventionof diseases which are associated with the modulation of H3 receptors.