class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: D = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

e = A("e")
a = B("a")
f = C("f")
i = D("i")
l = B("l")
g = D("g")
b = B("b")
n = D("n")

e.r = f
e.w = f
e.o = i
a.t = f
a.v = f
a.u = e
f.o = e
i.z = b
l.t = f
l.v = f
l.u = e
g.z = b
b.t = f
b.v = f
b.u = e
n.z = a
assert f.o.o.z.u.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: D = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

e = A("e")
a = B("a")
f = C("f")
i = D("i")
l = B("l")
g = D("g")
b = B("b")
n = D("n")

e.r = f
e.w = f
e.o = i
a.t = f
a.v = f
a.u = e
f.o = e
i.z = b
l.t = f
l.v = f
l.u = e
g.z = b
b.t = f
b.v = f
b.u = e
n.z = a
assert f.o.o.z.u.o.z.txt == "b"