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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: H = None
        self.w: E = None
        self.r: G = None
        self.u: I = None
        self.x: C = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: H = None
        self.p: I = None
        self.s: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: H = None
        self.w: E = None
        self.r: G = None
        self.u: I = None
        self.x: C = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: H = None
        self.p: I = None
        self.s: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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