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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.p: H = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.v: J = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: H = None
        self.z: C = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.p: H = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.v: J = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: H = None
        self.z: C = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

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

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