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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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