Create a grasshopper group from the last N components

without testing, this seems to be interesting:

maybe paired with this one:

oh, and I’d like to use the opportunity to say thank you to you Petras, your website is an amazing add with great examples of c# code. Your site saved me sooooo much time!!
Thank you!