Return the last color of the input in Manufactoria This puzzle is the next in my series of Manufactoria challenges.

Background

Manufactoria is a game / two-dimensional programming language.  The player must create programs that will manipulate a queue to arrive at the desired output.  It is easy to learn but hard to master, so it lends itself to creating a wide variety of challenges.  If you don't know what I am talking about, I advise that you play the first few tutorial levels of the game.

Challenge

Your challenge is to create a machine that will return the very last element of the input string.  To make this even more challenging, the input string can be any combination of all four colors.

The official custom level to be used is found here: 

http://pleasingfungus.com/Manufactoria/?ctm=Last_in_Line!;IN:_a_series_of_colors_OUT:_the_very_last_color;byrgyrbyrrgry:y|bbrrbryyyrrbr:r|ggryybrryr:r|b:b|:|gyrbrygbrygbyrb:b|brbrbryyrygbrg:g|rrrrrrrrrr:r;13;3;0;

This week's challenge is mostly focused on the idea of compression. I chose this challenge to require a huge mess of conveyor belts. The fact that all four colors appear in the input means that it is very hard to store information.

Although I did not attempt compression, my first working prototype had 114 parts and fit into the 13x13 space with almost no room to spare.  

Scoring

The goal of this challenge is to use a few parts as possible.  The score is the number of parts placed, and the lowest score wins.

Although there are only 8 test cases, your creation should be able to theoretically function under any test case.  The test cases provided are for debugging purposes.

Examples

in:  byrgyrbyrrgry
out: y
in:  ggryybrryr
out: r
in:         #don't you love degenerate cases?
out:
in:  gyrbrygbrygbyrb
out: b
73 69 parts



Organizing as a strip seems to save a lot of devices.  Left-to-right, the columns are "last color was yellow", "last color was blue", two columns of devices, "last color was red", "last color was green", and "all done".

http://pleasingfungus.com/Manufactoria/?lvl=35&amp;code=c10:8f2;q11:6f5;i11:7f0;p11:8f5;i12:6f4;q12:7f5;p12:8f5;c13:8f0;i10:7f6;i10:6f6;i13:6f7;i13:7f7;c9:6f3;c9:7f3;c9:8f3;q11:9f3;q12:9f3;c9:9f2;i10:9f3;i13:9f2;g12:12f3;c10:10f1;c13:11f1;c13:10f1;c10:11f1;p12:2f3;q12:3f3;c13:2f3;i13:3f5;c11:2f0;c10:2f3;i10:3f1;c11:3f0;c9:3f3;p11:11f3;p12:10f3;i11:10f1;i12:11f5;c14:3f3;c14:6f3;c14:7f3;c14:8f3;c14:9f0;i14:4f5;c14:5f3;i13:4f5;c13:5f3;y11:12f3;c11:13f2;c9:4f3;c9:5f3;c10:4f3;c10:5f3;b11:5f1;c11:4f2;c12:4f2;c15:4f3;c15:5f3;c15:6f3;c15:8f3;c15:7f3;c15:9f3;c15:10f3;c15:11f3;c15:12f3;c15:13f0;c14:13f0;c13:13f0;r12:5f1;&amp;ctm=Last_in_Line!;IN:_a_series_of_colors_OUT:_the_very_last_color;byrgyrbyrrgry:y|bbrrbryyyrrbr:r|ggryybrryr:r|b:b|:|gyrbrygbrygbyrb:b|brbrbryyrygbrg:g|rrrrrrrrrr:r;13;3;