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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.x: B = None
        self.y: H = None
        self.u: I = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.u: H = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.x: B = None
        self.y: H = None
        self.u: I = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.u: H = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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