class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: J = None
        self.x: B = None
        self.u: A = None
        self.w: H = None
        self.p: J = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: I = None
        self.t: B = None
        self.v: C = None
        self.s: B = None
        self.x: D = None
        self.o: J = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: A = None
        self.s: A = None
        self.r: D = None
        self.v: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: J = None
        self.x: B = None
        self.u: A = None
        self.w: H = None
        self.p: J = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: I = None
        self.t: B = None
        self.v: C = None
        self.s: B = None
        self.x: D = None
        self.o: J = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: A = None
        self.s: A = None
        self.r: D = None
        self.v: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.txt = txt

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

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