class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: F = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.t: I = None
        self.s: I = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.s: E = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: D = None
        self.y: C = None
        self.t: G = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.t: I = None
        self.s: I = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.s: E = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: D = None
        self.y: C = None
        self.t: G = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

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

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