class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: D = None
        self.u: D = None
        self.q: B = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.o: G = None
        self.y: G = None
        self.r: F = None
        self.t: D = None
        self.s: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.s: H = None
        self.z: C = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.o: G = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.u: D = None
        self.v: B = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: B = None
        self.s: F = None
        self.r: E = None
        self.x: A = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.o: G = None
        self.y: G = None
        self.r: F = None
        self.t: D = None
        self.s: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.s: H = None
        self.z: C = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.o: G = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.u: D = None
        self.v: B = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: B = None
        self.s: F = None
        self.r: E = None
        self.x: A = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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