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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.w: G = None
        self.t: A = None
        self.s: H = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.s: G = None
        self.y: G = None
        self.u: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.w: G = None
        self.t: A = None
        self.s: H = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.s: G = None
        self.y: G = None
        self.u: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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