I am currently learning scala and I want to perform the following task:
I have the following text file as input: 

```
10 location String
10 age      String
10 Salary   String 
15 job      String
10 Name     String
15 Status   String

```

The code I should write can be described as follows: 
If a line starts with 15, the second field has to be replaced with the second field of the first previous line starting by 10. 
Hence the output shall look like: 

```
10 location String
10 age      String
10 Salary   String 
15 Salray   String
10 Name     String
15 Name     String

```