class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.t: D = None
        self.v: D = None
        self.x: A = None
        self.p: B = None
        self.q: F = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.z: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.t: D = None
        self.v: D = None
        self.x: A = None
        self.p: B = None
        self.q: F = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.z: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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