class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.x: C = None
        self.t: A = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.z: E = None
        self.r: A = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

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

b = A("b")
k = B("k")
l = C("l")
j = D("j")
h = E("h")
d = F("d")
i = C("i")
a = A("a")

b.q = a
b.u = a
b.t = a
b.x = l
b.o = i
k.y = j
k.v = j
k.t = j
k.q = j
k.z = h
k.r = a
l.o = d
l.q = a
l.y = k
l.u = k
j.z = b
j.y = k
j.p = h
j.o = d
h.r = a
h.v = j
d.u = k
d.o = k
d.x = h
d.r = h
d.s = l
i.o = d
i.q = b
i.y = k
i.u = k
a.q = b
a.u = b
a.t = b
a.x = l
a.o = i
assert d.u.z.r.t.x.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.x: C = None
        self.t: A = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.z: E = None
        self.r: A = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

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

b = A("b")
k = B("k")
l = C("l")
j = D("j")
h = E("h")
d = F("d")
i = C("i")
a = A("a")

b.q = a
b.u = a
b.t = a
b.x = l
b.o = i
k.y = j
k.v = j
k.t = j
k.q = j
k.z = h
k.r = a
l.o = d
l.q = a
l.y = k
l.u = k
j.z = b
j.y = k
j.p = h
j.o = d
h.r = a
h.v = j
d.u = k
d.o = k
d.x = h
d.r = h
d.s = l
i.o = d
i.q = b
i.y = k
i.u = k
a.q = b
a.u = b
a.t = b
a.x = l
a.o = i
assert d.u.z.r.t.x.o.x.txt == "h"