for ($i = 1; $i < 376; $i++) {
string $curve = ("bodycurveA"+$i);
string $firstcvpos = ($curve+".controlPoints[0].yValue");
string $lastcvpos = ($curve+".controlPoints[99].yValue");
if (getAttr($firstcvpos) < getAttr($lastcvpos)) {
select -r $curve;
reverseCurve -ch 1 -rpo 1 $curve;
}
}