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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: I = None
        self.y: J = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: I = None
        self.y: J = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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