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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.u: D = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: G = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: E = None
        self.u: B = None
        self.y: D = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.o: I = None
        self.p: I = None
        self.z: F = None
        self.v: B = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

n = A("n")
h = B("h")
m = C("m")
i = D("i")
b = E("b")
l = F("l")
k = G("k")
f = H("f")
g = I("g")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.u: D = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: G = None
        self.t: H = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: E = None
        self.u: B = None
        self.y: D = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.o: I = None
        self.p: I = None
        self.z: F = None
        self.v: B = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

n = A("n")
h = B("h")
m = C("m")
i = D("i")
b = E("b")
l = F("l")
k = G("k")
f = H("f")
g = I("g")
d = C("d")

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