class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: F = None
        self.t: F = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: F = None
        self.t: F = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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