Allocate text

Assign lines from list 1 to IDs in list 2 according to the chosen unit size.

Input example

List 1:
alpha
beta
List 2:
ID1|1000

Output example

alpha|ID1
beta|ID1

Unit: 500