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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.p: A = None
        self.o: H = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.w: I = None
        self.x: I = None
        self.y: D = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.p: A = None
        self.o: H = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.w: I = None
        self.x: I = None
        self.y: D = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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