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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.u: G = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: F = None
        self.s: G = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

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

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

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

n = A("n")
g = B("g")
e = C("e")
j = D("j")
b = E("b")
c = F("c")
m = G("m")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.u: G = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: F = None
        self.s: G = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

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

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

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

n = A("n")
g = B("g")
e = C("e")
j = D("j")
b = E("b")
c = F("c")
m = G("m")
l = H("l")

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