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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.w: E = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

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

d = A("d")
g = B("g")
b = C("b")
a = D("a")
e = E("e")
f = E("f")
k = A("k")
j = D("j")

d.v = f
d.s = j
g.y = j
g.w = d
g.v = b
b.z = g
b.w = d
b.t = f
b.r = f
a.x = b
a.t = b
a.u = f
a.w = e
a.v = j
e.r = b
e.o = g
e.s = g
f.r = b
f.o = g
f.s = g
k.v = e
k.s = j
j.x = b
j.t = b
j.u = e
j.w = e
j.v = a
assert a.u.r.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.w: E = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

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

d = A("d")
g = B("g")
b = C("b")
a = D("a")
e = E("e")
f = E("f")
k = A("k")
j = D("j")

d.v = f
d.s = j
g.y = j
g.w = d
g.v = b
b.z = g
b.w = d
b.t = f
b.r = f
a.x = b
a.t = b
a.u = f
a.w = e
a.v = j
e.r = b
e.o = g
e.s = g
f.r = b
f.o = g
f.s = g
k.v = e
k.s = j
j.x = b
j.t = b
j.u = e
j.w = e
j.v = a
assert a.u.r.w.s.txt == "j"