class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.z: D = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.x: A = None
        self.v: F = None
        self.t: F = None
        self.q: F = None
        self.u: E = None
        self.s: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.w: B = None
        self.p: G = None
        self.o: C = None
        self.x: G = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: C = None
        self.y: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: A = None
        self.x: C = None
        self.z: D = None
        self.r: D = None
        self.w: D = None
        self.p: G = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: H = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.x: A = None
        self.v: F = None
        self.t: F = None
        self.q: F = None
        self.u: E = None
        self.s: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.w: B = None
        self.p: G = None
        self.o: C = None
        self.x: G = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: C = None
        self.y: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: A = None
        self.x: C = None
        self.z: D = None
        self.r: D = None
        self.w: D = None
        self.p: G = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: H = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

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

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