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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: C = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: C = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

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