class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.v: B = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.t: E = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.p: A = None
        self.q: B = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.w: B = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.y: F = None
        self.u: B = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.t: E = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.p: A = None
        self.q: B = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: G = None
        self.w: B = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.y: F = None
        self.u: B = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

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

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