The present disclosure provides a compound of Formula I: # imgabs0 # or an N-
oxide thereof, or a pharmaceutically acceptable salt of the compound or the N-
oxide, wherein: A, Y, m, n, p, R1, R2, R3, R3a, R4, R5, R6, R7, and Z are as described herein; the present disclosure provides processes for preparing such compounds, N-oxides, or salts; intermediates useful for the preparation of such compounds, N-oxides, or salts; the present invention relates to compounds, N-oxides, or salts, and compositions containing such compounds, N-oxides, or salts, and their use for the treatment of M4-mediated (or M4-related) disorders, including, for example, Alzheimer's
disease, Parkinson's
disease,
schizophrenia (e.g., their cognitive and negative symptoms), pain,
addiction, and sleep disorders.