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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.r: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.u: A = None
        self.o: D = None
        self.txt = txt

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

c.q = h
c.t = h
c.o = i
c.y = k
k.r = h
f.y = k
f.s = c
j.p = i
j.v = b
a.y = c
a.z = b
a.r = h
a.v = f
h.x = f
h.w = a
h.u = c
h.o = j
b.y = c
b.z = a
b.r = h
b.v = f
i.p = j
i.v = b
assert b.y.q.u.o.v.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.r: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.u: A = None
        self.o: D = None
        self.txt = txt

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

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