class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.q: G = None
        self.z: A = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.q: G = None
        self.z: A = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

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

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