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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.y: A = None
        self.u: G = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.y: A = None
        self.u: G = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

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