import asyncio
async def pipe(reader,writer):
 try:
  while data:=await reader.read(65536):writer.write(data);await writer.drain()
 finally:writer.close()
async def proxy(reader,writer,target):
 r,w=await asyncio.open_connection('127.0.0.1',target)
 await asyncio.gather(pipe(reader,w),pipe(r,writer))
async def main():
 a=await asyncio.start_server(lambda r,w:proxy(r,w,14343),'0.0.0.0',14344)
 b=await asyncio.start_server(lambda r,w:proxy(r,w,13819),'0.0.0.0',13820)
 await asyncio.gather(a.serve_forever(),b.serve_forever())
asyncio.run(main())
