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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.u: H = None
        self.v: A = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: H = None
        self.u: A = None
        self.v: C = None
        self.p: D = None
        self.w: D = None
        self.t: E = None
        self.z: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: D = None
        self.v: H = None
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.u: H = None
        self.v: A = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: H = None
        self.u: A = None
        self.v: C = None
        self.p: D = None
        self.w: D = None
        self.t: E = None
        self.z: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: D = None
        self.v: H = None
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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