class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.p: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: F = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: D = None
        self.z: E = None
        self.y: G = None
        self.x: A = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: F = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: D = None
        self.z: E = None
        self.y: G = None
        self.x: A = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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