The present invention provides the compound of logical formula (I), their salt and N- oxide and its solvates and prodrug (wherein, variable is defined as in the description). The compound of logical formula (I) is the inhibitor of plasma thromboplastin antecedent a, they can effective what prevention and/or treatment thromboembolic disorders.本發明提供了通式(I)的化合物、它們的鹽和N-氧化物,以及其溶劑合物和前藥(其中,變量如說明書所定義)。通式(I)的化合物是凝血因子XIa的抑制劑,它們可有效用於預防和/或治療血栓栓塞疾病。