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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.y: B = None
        self.s: I = None
        self.v: F = None
        self.x: F = None
        self.u: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.p: D = None
        self.q: E = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: H = None
        self.w: G = None
        self.x: G = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.y: B = None
        self.s: I = None
        self.v: F = None
        self.x: F = None
        self.u: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.p: D = None
        self.q: E = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: H = None
        self.w: G = None
        self.x: G = None
        self.u: G = None
        self.y: B = None
        self.txt = txt

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

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