class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.o: G = None
        self.v: D = None
        self.z: F = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.o: B = None
        self.r: D = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.txt = txt

d = A("d")
b = B("b")
a = C("a")
k = D("k")
m = E("m")
g = F("g")
n = G("n")
j = H("j")
e = I("e")

d.u = g
d.z = g
d.r = m
d.o = n
d.v = k
d.q = k
d.y = b
b.u = g
b.o = g
b.t = g
b.r = d
b.v = a
a.t = g
a.r = g
a.z = e
a.o = m
a.y = m
a.u = k
a.s = k
a.q = d
a.x = n
k.t = j
k.q = j
k.p = j
k.r = e
k.w = e
k.y = b
k.z = b
k.s = n
m.w = b
m.o = b
m.s = g
m.z = g
m.r = k
m.u = d
g.y = k
g.p = k
g.w = e
g.r = a
g.o = m
g.t = n
n.v = g
n.r = m
j.s = m
j.t = g
j.u = a
e.z = d
e.t = j
assert k.q.u.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.o: G = None
        self.v: D = None
        self.z: F = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.o: B = None
        self.r: D = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.txt = txt

d = A("d")
b = B("b")
a = C("a")
k = D("k")
m = E("m")
g = F("g")
n = G("n")
j = H("j")
e = I("e")

d.u = g
d.z = g
d.r = m
d.o = n
d.v = k
d.q = k
d.y = b
b.u = g
b.o = g
b.t = g
b.r = d
b.v = a
a.t = g
a.r = g
a.z = e
a.o = m
a.y = m
a.u = k
a.s = k
a.q = d
a.x = n
k.t = j
k.q = j
k.p = j
k.r = e
k.w = e
k.y = b
k.z = b
k.s = n
m.w = b
m.o = b
m.s = g
m.z = g
m.r = k
m.u = d
g.y = k
g.p = k
g.w = e
g.r = a
g.o = m
g.t = n
n.v = g
n.r = m
j.s = m
j.t = g
j.u = a
e.z = d
e.t = j
assert k.q.u.z.t.txt == "j"