Let's say I have the following input:

```
string input = "123456789";

```

and expect the following output: 

```
string output = "741852963";

```

The logic is a square which needs to be turned by 90 degrees to the right - but without linebreak.

```
//  squares
//INPUT     OUTPUT
// 123  ══╗  741
// 456    V  852
// 789       963

```

The width should be dynamic and always 

```
int width = (int)Math.Sqrt(input.Length);

```

Is there a easy approach to solve this?