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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: B = None
        self.o: C = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: B = None
        self.o: C = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.txt = txt

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

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