← Home
```go
package main

import (
	"fmt"
)

func main() {
	var n, k int
	var s string
	// Read n, k and the slogan string
	// fmt.Scan parses space-separated values, treating newlines as spaces.
	fmt.Scan(&n, &k, &s)

	// Convert 1-based index k to 0-based index
	k--

	// Calculate distance to the left end (0) and right end (n-1)
	distLeft := k
	distRight := n - 1 - k

	// Strategy: Always go to the closer end first to minimize travel distance.
	// If we go to the closer end first, we travel that short segment twice (there and back)
	// and the long segment once. If we did the reverse, we'd travel the long segment twice.

	if distLeft <= distRight {
		// Go Left first, then sweep Right
		
		// 1. Paint current character
		fmt.Printf("PRINT %c\n", s[k])
		
		// 2. Move left to the start, painting characters
		for i := k - 1; i >= 0; i-- {
			fmt.Println("LEFT")
			fmt.Printf("PRINT %c\n", s[i])
		}
		
		// 3. Move right to the end. Only paint characters that haven't been painted (indices > k)
		for i := 1; i < n; i++ {
			fmt.Println("RIGHT")
			if i > k {
				fmt.Printf("PRINT %c\n", s[i])
			}
		}
	} else {
		// Go Right first, then sweep Left
		
		// 1. Paint current character
		fmt.Printf("PRINT %c\n", s[k])
		
		// 2. Move right to the end, painting characters
		for i := k + 1; i < n; i++ {
			fmt.Println("RIGHT")
			fmt.Printf("PRINT %c\n", s[i])
		}
		
		// 3. Move left to the start. Only paint characters that haven't been painted (indices < k)
		for i := n - 2; i >= 0; i-- {
			fmt.Println("LEFT")
			if i < k {
				fmt.Printf("PRINT %c\n", s[i])
			}
		}
	}
}
```