class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

d = A("d")
j = B("j")
n = C("n")
g = D("g")
h = E("h")
f = F("f")
b = G("b")
c = H("c")
k = D("k")

d.z = c
d.y = c
j.z = g
j.v = b
j.s = d
j.q = d
j.w = h
j.p = c
j.o = k
n.p = c
n.x = c
n.r = k
n.q = b
n.s = b
n.t = d
n.z = d
g.t = b
g.u = d
g.r = c
g.w = h
g.q = k
g.s = f
g.y = j
h.y = b
h.v = c
h.x = c
h.w = f
f.t = d
b.q = j
b.z = j
b.w = j
b.v = d
c.q = d
c.p = g
c.v = j
k.t = b
k.u = d
k.r = c
k.w = h
k.q = g
k.s = f
k.y = j
assert b.z.z.r.v.v.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

d = A("d")
j = B("j")
n = C("n")
g = D("g")
h = E("h")
f = F("f")
b = G("b")
c = H("c")
k = D("k")

d.z = c
d.y = c
j.z = g
j.v = b
j.s = d
j.q = d
j.w = h
j.p = c
j.o = k
n.p = c
n.x = c
n.r = k
n.q = b
n.s = b
n.t = d
n.z = d
g.t = b
g.u = d
g.r = c
g.w = h
g.q = k
g.s = f
g.y = j
h.y = b
h.v = c
h.x = c
h.w = f
f.t = d
b.q = j
b.z = j
b.w = j
b.v = d
c.q = d
c.p = g
c.v = j
k.t = b
k.u = d
k.r = c
k.w = h
k.q = g
k.s = f
k.y = j
assert b.z.z.r.v.v.v.y.txt == "c"