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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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