class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: J = None
        self.r: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.u: I = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: E = None
        self.o: J = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.s: G = None
        self.x: D = None
        self.p: A = None
        self.u: A = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.u: I = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: E = None
        self.o: J = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.s: G = None
        self.x: D = None
        self.p: A = None
        self.u: A = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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