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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.o: H = None
        self.v: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: G = None
        self.t: A = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.y: A = None
        self.w: F = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.o: H = None
        self.v: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.o: B = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: G = None
        self.t: A = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.y: A = None
        self.w: F = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

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