class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.y: A = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.txt = txt

n = A("n")
m = B("m")
h = C("h")
l = D("l")
j = E("j")
a = F("a")
b = G("b")
e = G("e")
f = A("f")
g = B("g")

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.y: A = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.txt = txt

n = A("n")
m = B("m")
h = C("h")
l = D("l")
j = E("j")
a = F("a")
b = G("b")
e = G("e")
f = A("f")
g = B("g")

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