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CLOSE,0,AA3,4,1),COLORYELLOW;
STICKLINE(反转,0,5,4,0),COLORRED;