class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: C = None
        self.v: G = None
        self.u: I = None
        self.w: J = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: B = None
        self.v: I = None
        self.r: J = None
        self.z: G = None
        self.u: H = None
        self.y: D = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.y: G = None
        self.r: B = None
        self.q: H = None
        self.z: H = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: J = None
        self.v: J = None
        self.x: C = None
        self.p: A = None
        self.t: I = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.w: B = None
        self.y: H = None
        self.r: F = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: B = None
        self.v: I = None
        self.r: J = None
        self.z: G = None
        self.u: H = None
        self.y: D = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.y: G = None
        self.r: B = None
        self.q: H = None
        self.z: H = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: J = None
        self.v: J = None
        self.x: C = None
        self.p: A = None
        self.t: I = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.w: B = None
        self.y: H = None
        self.r: F = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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