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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: C = None
        self.s: E = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

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

n = A("n")
c = B("c")
k = C("k")
f = D("f")
g = E("g")
l = F("l")
j = G("j")
a = H("a")
i = D("i")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: C = None
        self.s: E = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

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

n = A("n")
c = B("c")
k = C("k")
f = D("f")
g = E("g")
l = F("l")
j = G("j")
a = H("a")
i = D("i")

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