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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.t: F = None
        self.x: D = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: H = None
        self.x: C = None
        self.w: A = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: H = None
        self.r: E = None
        self.z: C = None
        self.s: A = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.t: F = None
        self.x: D = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: H = None
        self.x: C = None
        self.w: A = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: H = None
        self.r: E = None
        self.z: C = None
        self.s: A = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

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

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