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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.v: H = None
        self.q: A = None
        self.w: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: A = None
        self.o: F = None
        self.x: H = None
        self.s: H = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: G = None
        self.w: F = None
        self.q: F = None
        self.s: A = None
        self.u: F = None
        self.x: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.z: A = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.v: H = None
        self.q: A = None
        self.w: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: A = None
        self.o: F = None
        self.x: H = None
        self.s: H = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: G = None
        self.w: F = None
        self.q: F = None
        self.s: A = None
        self.u: F = None
        self.x: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.z: A = None
        self.y: I = None
        self.txt = txt

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

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

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

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