Just rank them in the order you want them. Then, be patient... it is as simple as that. The ranking and match process is completely in a student's favor. Don't even think of changing your rankings based on what a program tells you or doesn't. You are in control of the process... it is yours to screw up. No joke.
You won't ever "lose" a program. That is a myth. Again, the ranking is completely and totally in a student's favor. Also, nobody will ever know your ranks unless you divulge them. A program could rank me top 3 (assuming they have 3 spots), and I could rank them 8th. I will still match there if and only if I don't match my top 7 above them... my ranking as a top choice by them would never get "lost" because I ranked them 8 and not 1,2,3, etc. Their rank list goes on hold until me and their other top 2 choices are out of the available student pool (then their match proceeds down their list and down and down until all their spots are filled up or until all of their ranked students are matched with other programs... and those unfilled spots scramble).
You obviously need both a student ranking a program and that same program ranking the student to have any chance of match, so if any of a program's ranked students don't rank the program at all in return, they fall off immediately and obviously couldn't possibly match there (same for students who rank programs that didn't rank them... no chance, the program would scramble before taking a student they didn't rank).
Top programs and students have pretty short rank lists since they know what they want and basically where/who they will match.
Average students/programs tend to be "backup" residencies/students to one another, and they usually tend to make the longest rank lists (average programs want good students who match better programs, average students want good programs who match better students... but usually it ends up balancing out).
Low level programs or low rank students don't even get very much interview interest and are scrambling most of the time, and most wise ones only rank what they'd like and would rather scramble than accept some of the bad/random residency/students they saw on clerkship/interview.
...I would strongly advise AGAINST ranking any program you wouldn't want to match into just because you are scared to scramble or because you know the crummy city/program is ranking you and it's a "safe" choice. You really shouldn't even waste your time interviewing for those that you would be unhappy to match at. It's a personal choice if you want to clerk and "warmup interview" at those types, though. Definitely do not rank them... you are in a very bad situation if you ranked and match into a program you don't like and then you like many of the scramble programs more (all you can really do there is try to transfer out after pgy1... very complicated).
Just remember that you rank them how you want them. That is all. If it's an amazing student and five good programs all ranked them top (ranked them X number or higher for their X spots), the student will get whichever of those program he or she ranked highest. The student dictated where they ended up, not any of the programs. If it is a crap student who a lot of programs didn't rank at all or ranked low, the match goes down and down the student's list of programs... until one who ranked the student (and didn't fill with a higher ranked). Either way, the match result still favors the student every single time.
Any program that pressures students to rank them highly "or we won't rank you high and will rank others high instead" is a joke. If any do that to you (at clerkship, interview, afterwards, etc), just lie and nod and tell them they are your #1 (even if they're your #5 or whatever). If they are not even a backup, just say you will keep that in mind and drop the contact. They are violating the rules at that point (basically trying to have their pick of backup students by hoping the students don't understand the match process and will bump their program up for fear of losing it as an option), and frankly, they deserve what they get.
...all that said, there is nothing wrong or in rule violation for a program to tell you "we liked you, we are ranking you as a top choice, so the program is yours if you want it." Likewise, students can definitely say "I feel I would fit well and learn a lot at this program, it is my top choice." The bad ethics and CRIP violation would be to pressure a program (or more likely a student) to alter or reveal their rankings... but it is totally fine if either side shows their own hand and communicates directly. I think it is wise and may elicit reciprocity. Residency programs, just like any job, tend to want someone who is talented... but also someone who wants to be there. Good luck and be patient with the process.
Scramble is nothing to be afraid of, but there won't be a lot of good residency spots in most years. The process happens fast and needs the residency to give approval for the spot to fill, so it tends to favor the residencies (whereas match definitely favored the students). Still, a good student who work fast in scramble can find quality spots... they might just have to be flexible on location. There are a few excellent students and excellent programs in the scramble every cycle (usually because they were lied to by their few presumed matches). It helps to have a basic list made up of which programs are good, fair, poor and have your residency app materials ready to fax/email if you think there is a decent possibility you might scramble... so you can hit the phones fast when the unfilled positions list comes out. It is not ideal to scramble, but you'd much rather scramble than take a proven loser of a clerkship you didn't like, city you absolutely don't want to live in, or a hospital you know doesn't get good numbers, most residents fail boards or get crummy jobs/competence afterward, director/attendings are toxic, has bad overall environment, etc. Don't fall for BS pressure to rank a program or to rank them higher... match is up to you, and students hold all of the advantages.