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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

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

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