class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.p: F = None
        self.u: D = None
        self.o: J = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: G = None
        self.r: B = None
        self.q: H = None
        self.x: G = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: I = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: G = None
        self.r: B = None
        self.q: H = None
        self.x: G = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: I = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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