Write a Kolmogorov Complexity Solver
Python 3, 240 236 bytes

import subprocess as s,itertools as i
def f(S,T,A,N=0):
 while 1:
  for P in i.product(A,repeat=N):
   try:
    P=&quot;&quot;.join(P);open(&quot;a&quot;,&quot;w&quot;).write(P)
    if s.check_output([&quot;py&quot;,&quot;-3&quot;,&quot;a&quot;],timeout=T).decode()==S:return P
   except:1
  N+=1

Don't run this. On my computer, at least, I found the program really hard to stop once it started running due to the pop-up windows created per process.
timeouts were only added to subprocess.check_output in Python 3, which is why we're using this rather than Python 2.
Here's an alternative version with a time.sleep that also prints all valid programs found along the way, as well as their corresponding output:
import subprocess as s,itertools as i
import time
def f(S,T,A,N=0):
 while 1:
  for P in i.product(A,repeat=N):
   time.sleep(0.2)
   try:
    P=&quot;&quot;.join(P);open(&quot;a&quot;,&quot;w&quot;).write(P);C=s.check_output([&quot;py&quot;,&quot;-3&quot;,&quot;a&quot;],timeout=T).decode()
    print(P,repr(C))
    if C==S:return P
   except:1
  N+=1

The program uses the filename a for each program P to be tested, so if you run this make sure you don't already have a file of that name. Replace [&quot;py&quot;,&quot;-3&quot;,&quot;a&quot;] with the appropriate command for your setup (e.g. [&quot;python&quot;,&quot;a&quot;] or [&quot;python3&quot;,&quot;a&quot;]).
Feel free to change the sleep duration at your own risk :). Call like f(&quot;1\r\n&quot;,1,&quot;1()print&quot;), where T is timeout in seconds.
First few lines of output from the tester with the above call:
 ''
1 ''
11 ''
() ''
111 ''
(1) ''
int ''
1111 ''

(If you want to help the program along a bit  you can change P=&quot;&quot;.join(P) to P=&quot;print&quot;+&quot;&quot;.join(P))
Since the above programs all have no output, here's the result for f(&quot;1\r\n&quot;,1,[&quot;print&quot;,&quot;(&quot;,&quot;)&quot;,&quot;1&quot;]) (tokens aren't part of the challenge, but I wanted to show what happens):
 ''
print ''
1 ''
() ''
11 ''
print() '\r\n'
(print) ''
(1) ''
111 ''
print(print) '&lt;built-in function print&gt;\r\n'
print(1) '1\r\n'

The return value is the string 'print(1)'.
Finally, just for fun, here's what happens if the alphabet is string.printable, i.e.
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!&quot;#$%&amp;\'()*+,-./:;&lt;=&gt;?@[\\]^_`{|}~ \t\n\r\x0b\x0c

Pastebin link of all valid 0-2 char Python 3 programs