class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.r: G = None
        self.x: G = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: B = None
        self.q: B = None
        self.z: I = None
        self.y: E = None
        self.u: H = None
        self.r: J = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: G = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: I = None
        self.o: A = None
        self.v: C = None
        self.r: G = None
        self.y: G = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.q: C = None
        self.x: G = None
        self.s: E = None
        self.w: D = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: B = None
        self.q: B = None
        self.z: I = None
        self.y: E = None
        self.u: H = None
        self.r: J = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: G = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: I = None
        self.o: A = None
        self.v: C = None
        self.r: G = None
        self.y: G = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.q: C = None
        self.x: G = None
        self.s: E = None
        self.w: D = None
        self.o: H = None
        self.txt = txt

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

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