Two formation channels of UCDs in Hickson Compact Groups