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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.r: A = None
        self.w: G = None
        self.y: F = None
        self.t: A = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: H = None
        self.y: B = None
        self.z: G = None
        self.r: G = None
        self.o: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: B = None
        self.y: E = None
        self.r: B = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.r: A = None
        self.w: G = None
        self.y: F = None
        self.t: A = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: H = None
        self.y: B = None
        self.z: G = None
        self.r: G = None
        self.o: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: B = None
        self.y: E = None
        self.r: B = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

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

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