diff --git a/main.c b/main.c
index e69de29..3f5b73d 100644
--- a/main.c
+++ b/main.c
@@ -0,0 +1,64 @@
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <string.h>
+#include <stdio.h>
+
+#define BUF_SIZE    100
+
+int main(void) {
+    int pipe_in[2], pipe_out[2];
+    pid_t pid;
+    char read_buf[BUF_SIZE];
+    pipe(pipe_in);
+    pipe(pipe_out);
+    if ((pid = fork()) == 0) {
+        close(pipe_in[0]);
+        close(pipe_out[1]);
+        dup2(pipe_in[1], STDOUT_FILENO);
+        dup2(pipe_out[0], STDIN_FILENO);
+        close(pipe_in[1]);
+        close(pipe_out[0]);
+
+        memset(read_buf, '0', BUF_SIZE);
+        if (read(0, read_buf, BUF_SIZE) != -1) {
+            fprintf(stderr, "\"%s\"\n", read_buf);
+            if (write(1, "Hello, my dad!", 15) != -1) {
+                memset(read_buf, '0', BUF_SIZE);
+                if (read(0, read_buf, BUF_SIZE) != -1) {
+                    fprintf(stderr, "\"%s\"\n", read_buf);
+                    if (write(1, "Nice to see you too!", 21) == -1) {
+                        perror("Child write: ");
+                    }
+                }
+            }
+        }
+
+    } else {
+        close(pipe_in[1]);
+        close(pipe_out[0]);
+
+        if (write(pipe_out[1], "Hello, my child!", 18) != -1) {
+            memset(read_buf, '0', BUF_SIZE);
+            if (read(pipe_in[0], read_buf, BUF_SIZE) != -1) {
+                fprintf(stderr, "\"%s\"\n", read_buf);
+                if (write(pipe_out[1], "Nice to see you again!", 23) != -1) {
+                    memset(read_buf, '0', BUF_SIZE);
+                    if (read(pipe_in[0], read_buf, BUF_SIZE) != -1) {
+                        fprintf(stderr, "\"%s\"\n", read_buf);
+                    } else {
+                        perror("Parent read: ");
+                    }
+                }
+            }
+        }
+
+        close(pipe_out[1]);
+        close(pipe_in[0]);
+
+        wait(NULL);
+
+    }
+
+    return 0;
+}