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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: H = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: A = None
        self.z: A = None
        self.o: G = None
        self.y: A = None
        self.w: H = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
e = C("e")
f = D("f")
b = E("b")
m = F("m")
h = G("h")
d = H("d")

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: H = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: A = None
        self.z: A = None
        self.o: G = None
        self.y: A = None
        self.w: H = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
e = C("e")
f = D("f")
b = E("b")
m = F("m")
h = G("h")
d = H("d")

c.y = d
j.t = m
j.z = b
j.u = f
j.o = f
j.p = c
j.y = e
e.u = h
e.o = h
e.z = d
e.q = j
f.q = b
f.z = b
f.s = b
f.p = b
f.u = h
f.o = j
f.t = d
f.v = e
b.o = f
b.u = f
b.z = f
b.y = h
b.w = h
b.s = m
b.x = c
b.p = e
m.q = j
m.r = j
m.s = c
m.z = c
m.y = c
m.o = h
m.w = d
m.u = d
h.q = f
h.t = j
h.y = j
h.u = m
d.z = j
d.p = e
d.t = c
assert d.z.y.z.t.y.t.y.z.txt == "j"