class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.o: E = None
        self.q: E = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.v: B = None
        self.o: G = None
        self.r: E = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.w: C = None
        self.y: B = None
        self.p: E = None
        self.z: C = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: F = None
        self.z: A = None
        self.p: H = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: B = None
        self.o: B = None
        self.s: D = None
        self.v: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

a = A("a")
l = B("l")
n = C("n")
c = D("c")
m = E("m")
j = F("j")
i = G("i")
h = H("h")
f = I("f")
k = E("k")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.v: B = None
        self.o: G = None
        self.r: E = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.w: C = None
        self.y: B = None
        self.p: E = None
        self.z: C = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: F = None
        self.z: A = None
        self.p: H = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: B = None
        self.o: B = None
        self.s: D = None
        self.v: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

a = A("a")
l = B("l")
n = C("n")
c = D("c")
m = E("m")
j = F("j")
i = G("i")
h = H("h")
f = I("f")
k = E("k")

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