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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.s: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

d = A("d")
j = B("j")
g = C("g")
m = D("m")
h = E("h")
k = F("k")
l = G("l")
e = E("e")

d.z = l
d.w = l
d.x = k
d.u = k
j.v = d
j.p = l
j.y = l
j.r = k
j.t = k
j.x = g
j.q = m
g.r = d
g.o = j
g.w = j
g.s = k
m.s = h
m.w = k
m.r = k
m.u = k
m.v = d
h.w = m
k.z = j
k.t = e
l.v = d
l.s = j
l.w = k
l.r = m
e.w = m
assert m.v.u.t.w.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.s: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

d = A("d")
j = B("j")
g = C("g")
m = D("m")
h = E("h")
k = F("k")
l = G("l")
e = E("e")

d.z = l
d.w = l
d.x = k
d.u = k
j.v = d
j.p = l
j.y = l
j.r = k
j.t = k
j.x = g
j.q = m
g.r = d
g.o = j
g.w = j
g.s = k
m.s = h
m.w = k
m.r = k
m.u = k
m.v = d
h.w = m
k.z = j
k.t = e
l.v = d
l.s = j
l.w = k
l.r = m
e.w = m
assert m.v.u.t.w.w.t.txt == "e"