class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.t: G = None
        self.v: G = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.s: B = None
        self.z: G = None
        self.q: D = None
        self.r: G = None
        self.y: B = None
        self.t: J = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.r: F = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.t: G = None
        self.v: G = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.s: B = None
        self.z: G = None
        self.q: D = None
        self.r: G = None
        self.y: B = None
        self.t: J = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.r: F = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

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