class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: H = None
        self.t: E = None
        self.o: C = None
        self.y: G = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: C = None
        self.z: A = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.w: H = None
        self.o: D = None
        self.r: D = None
        self.t: C = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.z: A = None
        self.p: E = None
        self.txt = txt

i = A("i")
l = B("l")
h = C("h")
f = D("f")
a = E("a")
c = F("c")
j = G("j")
m = H("m")
b = F("b")

i.u = h
i.z = l
l.w = a
l.u = j
l.s = m
h.x = f
h.u = j
h.s = i
h.r = i
f.p = c
f.q = m
f.t = a
f.o = h
f.y = j
f.u = l
a.y = h
a.r = h
c.o = a
c.q = h
c.z = i
c.x = m
j.z = l
j.u = f
j.o = f
j.r = f
j.w = m
j.y = m
j.t = h
m.s = h
m.q = l
m.z = i
m.p = a
b.o = a
b.q = h
b.z = i
b.x = m
assert m.z.u.u.w.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: H = None
        self.t: E = None
        self.o: C = None
        self.y: G = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: C = None
        self.z: A = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.w: H = None
        self.o: D = None
        self.r: D = None
        self.t: C = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.z: A = None
        self.p: E = None
        self.txt = txt

i = A("i")
l = B("l")
h = C("h")
f = D("f")
a = E("a")
c = F("c")
j = G("j")
m = H("m")
b = F("b")

i.u = h
i.z = l
l.w = a
l.u = j
l.s = m
h.x = f
h.u = j
h.s = i
h.r = i
f.p = c
f.q = m
f.t = a
f.o = h
f.y = j
f.u = l
a.y = h
a.r = h
c.o = a
c.q = h
c.z = i
c.x = m
j.z = l
j.u = f
j.o = f
j.r = f
j.w = m
j.y = m
j.t = h
m.s = h
m.q = l
m.z = i
m.p = a
b.o = a
b.q = h
b.z = i
b.x = m
assert m.z.u.u.w.s.s.txt == "i"