class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: F = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: E = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.o: B = None
        self.w: J = None
        self.r: B = None
        self.y: J = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: G = None
        self.u: A = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: A = None
        self.x: B = None
        self.u: F = None
        self.p: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: G = None
        self.y: E = None
        self.r: F = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

b.u = h
b.o = f
b.r = j
m.q = g
m.u = i
m.z = h
m.w = b
j.x = m
j.p = m
j.o = m
j.r = m
j.w = g
j.y = g
j.q = h
l.y = f
l.s = f
l.r = n
i.v = b
i.u = b
i.t = n
i.p = m
i.z = k
f.t = i
f.v = b
f.r = b
n.w = h
n.y = b
n.x = m
n.u = f
n.p = i
k.u = j
k.s = h
k.t = n
h.r = b
h.x = b
h.t = i
h.z = i
h.q = j
h.w = m
g.t = n
g.x = n
g.p = n
g.y = i
g.r = f
g.o = j
assert i.t.y.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: F = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: E = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.o: B = None
        self.w: J = None
        self.r: B = None
        self.y: J = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: G = None
        self.u: A = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: A = None
        self.x: B = None
        self.u: F = None
        self.p: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: G = None
        self.y: E = None
        self.r: F = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

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