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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: D = None
        self.v: D = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

b.v = n
b.p = n
b.o = i
b.w = m
b.z = a
b.x = c
b.q = k
c.s = a
c.x = m
c.v = m
c.u = d
c.t = d
k.r = d
k.v = b
k.z = i
k.s = n
k.t = c
k.o = c
k.u = a
m.s = d
i.y = c
i.v = c
i.u = c
i.w = m
i.t = m
i.p = n
i.z = a
d.s = i
d.y = i
d.p = a
d.v = k
d.o = k
d.t = n
d.z = n
d.q = m
d.w = m
f.w = n
n.y = i
n.p = a
n.t = a
n.s = a
n.o = f
n.q = m
n.w = c
n.v = k
n.u = k
a.w = d
a.y = d
a.s = i
a.o = i
a.t = i
a.u = f
a.p = k
a.z = k
assert a.y.t.t.u.w.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: H = None
        self.o: E = None
        self.w: D = None
        self.z: I = None
        self.x: B = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: D = None
        self.v: D = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

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