class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.o: E = None
        self.z: F = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: B = None
        self.p: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.o: E = None
        self.z: F = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: B = None
        self.p: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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