The pen is shorter than the pencil by 2 centimeters, so it's 12 - 2 = <<12-2=10>>10 centimeters long.
That means the rubber is 10 - 3 = <<10-3=7>>7 centimeters long
So all accessories are 7 + 10 + 12 = <<7+10+12=29>>29 centimeters long altogether.
#### 29