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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: H = None
        self.p: I = None
        self.w: I = None
        self.z: A = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: J = None
        self.r: A = None
        self.w: D = None
        self.o: H = None
        self.u: H = None
        self.z: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: J = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: H = None
        self.p: I = None
        self.w: I = None
        self.z: A = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: J = None
        self.r: A = None
        self.w: D = None
        self.o: H = None
        self.u: H = None
        self.z: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: J = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: B = None
        self.txt = txt

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

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

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

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