class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: C = None
        self.s: E = None
        self.y: G = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: C = None
        self.r: G = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: C = None
        self.r: G = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

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

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