Adding data for every month

Need to add data to text file every month
For current month it should be 2021 P1
Next month it should be 2021 P1, 2021 P2

Use append line activity

https://docs.uipath.com/activities/docs/append-line

How v can write code for it. Can u give a workflow. Bot should be automatically add every month from jan to dec
Eg: 2021P1 for jan
For feb it should be 2021P1, 2021P2
For March it should be 2021P1, 2021P2, 2021P3.

For next yr it should be 2021P1

For March, it should be only one line 2021P1, 2021P2, 2021P3 like this?

Or

2021P1
2021P1, 2021P2
2021P1, 2021P2, 2021P3

three lines like above?

1st one. Only one line

@sathish_kumar3 - Pls check this…

I will have to reset the year in this code…

Can u attach the xaml file

@sathish_kumar3 _ Here you go…
Main.xaml (8.5 KB)

@sathish_kumar3 - Did you get a chance to try the solution ?