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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: C = None
        self.q: J = None
        self.x: A = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: H = None
        self.o: C = None
        self.r: F = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.u: G = None
        self.s: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: C = None
        self.q: J = None
        self.x: A = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: H = None
        self.o: C = None
        self.r: F = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.u: G = None
        self.s: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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