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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: H = None
        self.x: J = None
        self.o: G = None
        self.y: I = None
        self.u: A = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.p: D = None
        self.z: B = None
        self.o: A = None
        self.x: H = None
        self.q: H = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.o: I = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.p: J = None
        self.u: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: F = None
        self.x: F = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: H = None
        self.x: J = None
        self.o: G = None
        self.y: I = None
        self.u: A = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.p: D = None
        self.z: B = None
        self.o: A = None
        self.x: H = None
        self.q: H = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.o: I = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.p: J = None
        self.u: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: F = None
        self.x: F = None
        self.r: D = None
        self.p: E = None
        self.txt = txt

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

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