class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: H = None
        self.p: C = None
        self.q: H = None
        self.o: I = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.v: A = None
        self.u: D = None
        self.z: F = None
        self.o: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.u: H = None
        self.q: F = None
        self.w: E = None
        self.p: J = None
        self.t: A = None
        self.y: E = None
        self.z: B = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: J = None
        self.z: E = None
        self.o: F = None
        self.u: G = None
        self.v: B = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: E = None
        self.v: A = None
        self.u: D = None
        self.z: F = None
        self.o: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.u: H = None
        self.q: F = None
        self.w: E = None
        self.p: J = None
        self.t: A = None
        self.y: E = None
        self.z: B = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: J = None
        self.z: E = None
        self.o: F = None
        self.u: G = None
        self.v: B = None
        self.p: E = None
        self.txt = txt

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

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

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