@echo off&setlocal enabledelayedexpansion for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do ( set /a n+=1,a=!random!%%2 if !a! equ 0 ( set "_!random!!random!!random!=%%i" ) else ( set "_!random!!random!!random!=!n!" ) ) for /f "tokens=2 delims==" %%i in ('set _') do ( set /a n-=1 if !n! equ 15 pause>nul&goto :eof set /p=%%i <nul )