class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.t: A = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: C = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.t: A = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: C = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: F = None
        self.t: D = None
        self.txt = txt

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

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