c ++ The output should be (abc),(def),(ghw)

#include <iostream>
#include <string>

int main() {
    std::string str = "abcdefghi";
    std::cout << "(" << str.substr(0, 3) << "),(" << str.substr(3, 3) << "),(" << str.substr(6, 3) << ")";
    return 0;
}