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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.q: G = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.x: F = None
        self.u: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.q: G = None
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.x: F = None
        self.u: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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