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

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

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

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

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

f.v = i
f.q = b
f.s = e
b.s = l
b.v = l
b.t = e
j.t = g
j.y = g
i.x = e
i.t = e
i.z = b
i.o = n
g.s = l
g.v = l
g.t = e
d.v = i
d.q = b
d.s = e
l.t = g
l.y = b
n.v = i
n.s = i
n.q = g
e.x = i
e.t = i
e.z = b
e.o = d
assert g.t.o.q.v.t.t.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

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

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

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

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

f.v = i
f.q = b
f.s = e
b.s = l
b.v = l
b.t = e
j.t = g
j.y = g
i.x = e
i.t = e
i.z = b
i.o = n
g.s = l
g.v = l
g.t = e
d.v = i
d.q = b
d.s = e
l.t = g
l.y = b
n.v = i
n.s = i
n.q = g
e.x = i
e.t = i
e.z = b
e.o = d
assert g.t.o.q.v.t.t.x.z.txt == "b"