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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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