class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.u: G = None
        self.q: A = None
        self.w: G = None
        self.r: A = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.w: F = None
        self.z: A = None
        self.q: D = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

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

m = A("m")
c = B("c")
j = C("j")
f = D("f")
a = E("a")
d = F("d")
g = G("g")
i = F("i")
h = A("h")

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.w: F = None
        self.z: A = None
        self.q: D = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

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

m = A("m")
c = B("c")
j = C("j")
f = D("f")
a = E("a")
d = F("d")
g = G("g")
i = F("i")
h = A("h")

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