class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: I = None
        self.s: D = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: H = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: I = None
        self.o: D = None
        self.w: F = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: E = None
        self.s: I = None
        self.u: F = None
        self.w: D = None
        self.y: I = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: H = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: I = None
        self.o: D = None
        self.w: F = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: E = None
        self.s: I = None
        self.u: F = None
        self.w: D = None
        self.y: I = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.txt = txt

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

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