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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

g = A("g")
a = B("a")
l = C("l")
h = D("h")
d = E("d")
i = F("i")
e = G("e")
k = H("k")
b = I("b")
m = J("m")

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

g = A("g")
a = B("a")
l = C("l")
h = D("h")
d = E("d")
i = F("i")
e = G("e")
k = H("k")
b = I("b")
m = J("m")

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