const inputString = ``;
// Split the input string by newline characters
const lines = inputString.split('\n');
// Extract the first two parts before the pipe separator for each line and concatenate them with a colon separator
const convertedLines = lines.map((line) => {
const parts = line.split(':');
const firstTwoParts = parts.slice(0, 2);
return `${firstTwoParts.join(':').trim()}`;
});
// Convert the array of lines back to a string, joining them with newline characters
const convertedString = convertedLines.join('\n');
console.log(convertedString);