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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: A = None
        self.t: C = None
        self.w: D = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: J = None
        self.r: D = None
        self.p: B = None
        self.y: J = None
        self.u: C = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: F = None
        self.o: H = None
        self.q: G = None
        self.r: D = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: A = None
        self.t: C = None
        self.w: D = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: J = None
        self.r: D = None
        self.p: B = None
        self.y: J = None
        self.u: C = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: F = None
        self.o: H = None
        self.q: G = None
        self.r: D = None
        self.s: I = None
        self.txt = txt

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

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