#include <stdio.h>

int main() {
    
    float arr[5][5] = {0.0f};

    for (int i = 0; i < (sizeof(arr) / sizeof(arr[0])); i++)
    {
        for (int j = 0; j < (sizeof(arr[0]) / sizeof(arr[0][0])); j++)
        {
            scanf("%f",*(arr+i)+j);
        }
    }

    for (int i = 0; i < (sizeof(arr) / sizeof(arr[0])); i++)
    {
        float sum = 0.0f;
        for (int j = 0; j < (sizeof(arr[0]) / sizeof(arr[0][0])); j++)
        {
            printf("%.1f ",arr[i][j]);
            sum += arr[i][j];
        }
        printf("%.1f\n",sum);
    }
    
    return 0;
}