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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: F = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: F = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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