class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.t: C = None
        self.r: J = None
        self.w: E = None
        self.q: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: J = None
        self.z: J = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: B = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.u: F = None
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: J = None
        self.z: J = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: B = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.u: F = None
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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