{$APPTYPE CONSOLE}
{$Q+,R+,S+,H+,O-}
Const
  TaskID='sport';
  InFile=TaskID+'.in';
  OutFile=TaskID+'.out';
  MaxN=100000;

Var
  N,X,K:Integer;
  A:Array[1..MaxN]Of Integer;
  Pay:Array[1..MaxN]Of Boolean;
  NLeft:Integer;
  NG:Integer;
  Cnt2,Cnt0:Array[1..MaxN]Of Integer;
  Res:Integer;

Procedure Load;
Var
  I:Integer;
Begin
  Read(N,X,K);
  For I:=1 To N Do
    Read(A[I]);
End;

Procedure Solve;
Var
  I:Integer;
  We:Integer;
  NZ:Integer;
Begin
  We:=A[X];
  For I:=1 To N Do 
    If A[I]<We Then 
      A[I]:=0 
    Else If A[I]>We Then 
      A[I]:=2 
    Else If I<X Then 
      A[I]:=0 
    Else If I>X Then 
      A[I]:=2 
    Else 
      A[I]:=1;

  FillChar(Pay,SizeOf(Pay),False);

  NLeft:=0;
  For I:=1 To X-1 Do If A[I]=2 Then Inc(NLeft);

  If NLeft+K>=N-1 Then Begin
    Res:=X-NLeft;
    For I:=NLeft+1 To N-1 Do Pay[I]:=True;
    Exit;
  End;

  NG:=1;
  Cnt0[1]:=0;
  Cnt2[1]:=N;
  For I:=N DownTo X+1 Do Begin
    If A[I]=2 Then Begin
      Inc(Cnt2[NG]);
    End Else Begin
      If Cnt2[NG]>0 Then Begin
        Inc(NG);
        Cnt0[NG]:=0;
        Cnt2[NG]:=0;
      End;
      Inc(Cnt0[NG]);
    End;
  End;

  NZ:=0;
  For I:=NLeft+1 To N-1-K Do Begin
    While Cnt2[NG]=0 Do Begin
      Inc(NZ,Cnt0[NG]);
      Dec(NG);
    End;
    Dec(Cnt2[NG]);
  End;

  Res:=X-NLeft+NZ;
  For I:=N-K To N-1 Do Pay[I]:=True;
End;

Procedure Save;
Var
  I:Integer;
Begin
  WriteLn(Res);
  For I:=1 To N-1 Do If Pay[I] Then Write('+') Else Write('-');
  WriteLn;
End;

Begin
  ReSet(Input,InFile);
  ReWrite(Output,OutFile);
  Load;
  Solve;
  Save;
  Close(Input);
  Close(Output);
End.
