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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.x: D = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.x: D = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

i.v = d
i.x = g
i.r = g
i.s = f
i.o = n
f.q = g
f.z = g
f.y = i
f.x = n
f.w = n
c.u = l
c.q = i
g.q = n
g.v = e
g.t = j
l.u = f
m.u = d
m.q = j
d.u = f
n.q = g
n.v = l
n.t = i
j.v = d
j.x = n
j.r = n
j.s = f
j.o = g
e.u = f
assert g.q.t.s.txt == "f"