#include <iostream>
#include <iterator>
#include <vector>
template <typename Iterator>
void test(Iterator begin, const Iterator end) {
std::copy(begin, end, std::ostream_iterator<decltype(*begin)>(std::cout, "\n"));
}
template <typename Container>
void test(const Container& in) {
test(std::begin(in), std::end(in));
}
int main() {
std::vector<int> a = {1,2,3,4};
test(a);
int b[3]={5,6,7};
test(b);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDx2ZWN0b3I+Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgSXRlcmF0b3I+CnZvaWQgdGVzdChJdGVyYXRvciBiZWdpbiwgY29uc3QgSXRlcmF0b3IgZW5kKSB7CiAgc3RkOjpjb3B5KGJlZ2luLCBlbmQsIHN0ZDo6b3N0cmVhbV9pdGVyYXRvcjxkZWNsdHlwZSgqYmVnaW4pPihzdGQ6OmNvdXQsICJcbiIpKTsKfQoKdGVtcGxhdGUgPHR5cGVuYW1lIENvbnRhaW5lcj4Kdm9pZCB0ZXN0KGNvbnN0IENvbnRhaW5lciYgaW4pIHsKICAgIHRlc3Qoc3RkOjpiZWdpbihpbiksIHN0ZDo6ZW5kKGluKSk7Cn0KCmludCBtYWluKCkgewogICBzdGQ6OnZlY3RvcjxpbnQ+IGEgPSB7MSwyLDMsNH07CiAgIHRlc3QoYSk7CgogICBpbnQgYlszXT17NSw2LDd9OwogICB0ZXN0KGIpOwp9Cg==