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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: E = None
        self.q: E = None
        self.u: A = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: B = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = 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.p: B = None
        self.s: B = None
        self.y: G = None
        self.z: F = None
        self.w: J = None
        self.u: D = None
        self.t: B = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: G = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: E = None
        self.q: E = None
        self.u: A = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: B = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = 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.p: B = None
        self.s: B = None
        self.y: G = None
        self.z: F = None
        self.w: J = None
        self.u: D = None
        self.t: B = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: G = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

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