class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.v: I = None
        self.s: E = None
        self.o: I = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.z: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.txt = txt

a = A("a")
i = B("i")
k = C("k")
l = D("l")
m = E("m")
d = F("d")
g = G("g")
b = H("b")
h = I("h")
n = F("n")

a.s = b
a.q = k
a.r = l
i.y = k
i.r = g
i.v = h
i.o = h
i.s = m
i.t = m
i.u = a
k.u = g
l.o = h
l.v = h
m.w = n
m.x = k
m.z = k
d.w = m
d.r = m
d.y = m
d.z = k
d.s = a
d.o = i
d.p = g
d.x = l
g.s = k
g.w = i
b.p = n
b.x = m
b.t = h
h.o = i
h.p = g
n.w = m
n.r = m
n.y = m
n.z = k
n.s = a
n.o = i
n.p = g
n.x = l
assert n.x.o.o.u.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.v: I = None
        self.s: E = None
        self.o: I = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.z: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.txt = txt

a = A("a")
i = B("i")
k = C("k")
l = D("l")
m = E("m")
d = F("d")
g = G("g")
b = H("b")
h = I("h")
n = F("n")

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