class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.t: H = None
        self.p: C = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

g = A("g")
k = B("k")
n = C("n")
d = D("d")
i = E("i")
m = F("m")
j = G("j")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.t: H = None
        self.p: C = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

g = A("g")
k = B("k")
n = C("n")
d = D("d")
i = E("i")
m = F("m")
j = G("j")
l = H("l")

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