added solution to UVa 524-Prime Ring Problem