class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: D = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

i = A("i")
e = B("e")
j = C("j")
h = D("h")
n = D("n")
c = A("c")
k = A("k")
a = D("a")

i.v = j
i.r = j
i.o = h
i.p = h
e.y = n
e.t = n
e.q = h
j.s = n
h.t = n
h.q = n
h.p = e
h.x = j
n.t = a
n.q = h
n.p = e
n.x = j
c.v = j
c.r = j
c.o = n
c.p = h
k.v = j
k.r = j
k.o = h
k.p = h
a.t = h
a.q = n
a.p = e
a.x = j
assert j.s.q.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: D = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

i = A("i")
e = B("e")
j = C("j")
h = D("h")
n = D("n")
c = A("c")
k = A("k")
a = D("a")

i.v = j
i.r = j
i.o = h
i.p = h
e.y = n
e.t = n
e.q = h
j.s = n
h.t = n
h.q = n
h.p = e
h.x = j
n.t = a
n.q = h
n.p = e
n.x = j
c.v = j
c.r = j
c.o = n
c.p = h
k.v = j
k.r = j
k.o = h
k.p = h
a.t = h
a.q = n
a.p = e
a.x = j
assert j.s.q.t.t.t.txt == "h"