class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.s: G = None
        self.z: G = None
        self.q: A = None
        self.u: C = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: D = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.p: D = None
        self.q: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.s: G = None
        self.z: G = None
        self.q: A = None
        self.u: C = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: D = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.p: D = None
        self.q: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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