class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.y: C = None
        self.t: B = None
        self.q: G = 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.v: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: H = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.w: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.u: H = None
        self.s: G = None
        self.p: C = None
        self.r: A = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

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

g.u = d
g.z = f
g.y = j
g.t = m
g.q = l
m.z = k
j.v = h
j.o = g
k.p = h
k.t = n
k.q = n
d.o = k
d.v = h
d.t = h
d.w = n
d.q = n
d.r = i
d.y = g
h.v = f
h.u = k
h.w = i
h.t = n
l.v = f
l.s = f
l.y = f
l.x = k
l.z = k
l.u = n
l.p = j
l.r = g
n.o = m
n.y = d
n.t = d
n.v = g
i.o = k
i.v = h
i.t = h
i.w = n
i.q = n
i.r = d
i.y = g
f.v = l
f.s = l
f.y = l
f.x = k
f.z = k
f.u = n
f.p = j
f.r = g
assert h.v.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.y: C = None
        self.t: B = None
        self.q: G = 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.v: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: H = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.w: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.u: H = None
        self.s: G = None
        self.p: C = None
        self.r: A = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

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

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