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

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

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: B = None
        self.z: I = None
        self.v: J = None
        self.t: I = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.s: A = None
        self.u: A = None
        self.q: G = None
        self.v: G = None
        self.w: F = None
        self.z: J = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: G = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

b = A("b")
a = B("a")
k = C("k")
n = D("n")
j = E("j")
l = F("l")
c = G("c")
m = H("m")
d = I("d")
h = J("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: B = None
        self.z: I = None
        self.v: J = None
        self.t: I = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.s: A = None
        self.u: A = None
        self.q: G = None
        self.v: G = None
        self.w: F = None
        self.z: J = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: G = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

b = A("b")
a = B("a")
k = C("k")
n = D("n")
j = E("j")
l = F("l")
c = G("c")
m = H("m")
d = I("d")
h = J("h")

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