St Mirren and Dunfermline took up the final two spots in the Scottish League Cup second round after the Buddies beat Partick Thistle 2-0 in Paisley.
Jamie McGrath’s penalty and Joe Shaughnessy’s late tap-in ensured the Group H winners are seeded in the draw.
Second-placed Dunfermline progress as the one of the three best runners-up.
Hearts, already assured of a place in the next round, secured maximum points in Group A after Jamie Walker’s solitary goal defeated Inverness.
The Highlanders had Michael Gardyne sent off late on for a challenge on substitute Walker.
Hearts will visit Celtic in the second round with St Mirren away to Livingston and Dunfermline visiting Rangers.
![Jamie Walker scores](https://ichef.bbci.co.uk/onesport/cps/624/cpsprodpb/8652/production/_119568343_20156303.jpg)