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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: I = None
        self.v: A = None
        self.y: I = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.w: I = None
        self.s: E = None
        self.x: F = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: I = None
        self.v: A = None
        self.y: I = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.w: I = None
        self.s: E = None
        self.x: F = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

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

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

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