class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.y: E = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.o: F = None
        self.x: G = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: D = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.v: A = None
        self.o: H = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.y: E = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.o: F = None
        self.x: G = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: D = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.v: A = None
        self.o: H = None
        self.u: A = None
        self.txt = txt

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

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