class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: J = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: E = None
        self.w: A = None
        self.s: G = None
        self.u: I = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: J = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: E = None
        self.w: A = None
        self.s: G = None
        self.u: I = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

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

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