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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: E = None
        self.w: A = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: E = None
        self.w: A = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

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

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

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