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

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

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

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

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

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

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

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

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

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

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

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

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