class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.u: G = None
        self.r: C = None
        self.o: E = None
        self.s: B = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.w: A = None
        self.y: F = None
        self.z: A = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.r: G = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.txt = txt

c = A("c")
a = B("a")
h = C("h")
g = D("g")
e = E("e")
k = F("k")
n = G("n")
d = H("d")
l = G("l")
f = B("f")

c.q = n
c.z = n
c.v = h
c.r = h
c.u = l
c.p = l
c.o = e
c.s = f
a.t = f
a.y = k
h.o = a
h.u = g
h.x = d
h.p = k
g.t = h
g.u = h
g.v = h
g.w = c
g.z = c
g.y = k
e.t = d
e.v = k
e.r = n
e.o = h
e.p = a
k.q = l
n.x = d
d.s = e
d.x = h
l.x = d
f.t = a
f.y = k
assert e.o.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.u: G = None
        self.r: C = None
        self.o: E = None
        self.s: B = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.w: A = None
        self.y: F = None
        self.z: A = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.r: G = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.txt = txt

c = A("c")
a = B("a")
h = C("h")
g = D("g")
e = E("e")
k = F("k")
n = G("n")
d = H("d")
l = G("l")
f = B("f")

c.q = n
c.z = n
c.v = h
c.r = h
c.u = l
c.p = l
c.o = e
c.s = f
a.t = f
a.y = k
h.o = a
h.u = g
h.x = d
h.p = k
g.t = h
g.u = h
g.v = h
g.w = c
g.z = c
g.y = k
e.t = d
e.v = k
e.r = n
e.o = h
e.p = a
k.q = l
n.x = d
d.s = e
d.x = h
l.x = d
f.t = a
f.y = k
assert e.o.o.y.txt == "k"