Package udev is not configured yet
You have an error in udev post-installation script
addgroup: The group `input' already exists and is not a system group. Exiting. dpkg: error processing package udev (--configure): subprocess installed post-installation script returned error exit status 1
The other packages are just waiting for udev to complete
initramfs-tools-core depends on udev; however: Package udev is not configured yet. ... initramfs-tools depends on initramfs-tools-core (= 0.122ubuntu8.1); however: Package initramfs-tools-core is not configured yet.
So just make installation skip that script using
sudo mv /var/lib/dpkg/info/udev.postinst /var/lib/dpkg/info/udev.postinst.backup
then command below to continue previous installation.
sudo apt-get install -f
It should be fine, just non robust scripts that don't expect some rare situations. Copy back that script after you finish.
sudo mv /var/lib/dpkg/info/udev.postinst.backup /var/lib/dpkg/info/udev.postinst