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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.r: B = None
        self.p: B = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.r: B = None
        self.p: B = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

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

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