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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.u: F = None
        self.y: F = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: A = None
        self.u: A = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.q: E = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.u: F = None
        self.y: F = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: A = None
        self.u: A = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.q: E = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

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

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

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