% function [RKey] = Shuffle1R( Key1 )
% Using algorithm to specify the key back for shuffling
Key1=[162,28,62,124,78,14,116,133,164,141,109,160,84,16,60,11,32,119,49,150,26,118,77,42,8,115,161,56,123,106,75,98,130,79,155,55,151,167,57,95,45,93,101,46,65,40,64,68,125,52,66,12,3,86,128,135,108,19,145,166,85,156,27,90,17,33,91,157,168,29,34,63,96,18,4,58,67,153,111,104,131,51,94,73,154,83,43,149,54,10,59,39,97,158,140,137,53,38,120,21,92,129,107,47,37,148,82,71,41,36,7,143,61,152,139,165,113,48,9,87,100,74,126,22,69,99,102,20,121,163,169,1,142,81,103,159,112,76,70,72,13,144,25,146,138,24,5,30,6,2,114,23,35,44,122,134,136,80,127,15,88,89,50,132,31,147,110,105,117];
stime=tic;
RKey=zeros(1,numel(Key1));
for i=1:numel(Key1),
[j,Ind ]=min(Key1(:));
RKey(i)=Ind;
Key1(Ind)=10000;
end
RKey
toc(stime);
% end