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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.p: A = None
        self.s: D = None
        self.o: A = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.u: G = None
        self.t: D = None
        self.q: E = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: G = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: C = None
        self.p: A = None
        self.s: D = None
        self.o: A = None
        self.z: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.u: G = None
        self.t: D = None
        self.q: E = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: G = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: A = None
        self.txt = txt

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

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

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