class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: C = None
        self.w: G = None
        self.z: F = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.x: E = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.o: C = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.x: E = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.o: C = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

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

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