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

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

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

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

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

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

j.r = g
j.v = c
g.s = k
g.x = e
k.r = j
m.w = e
m.q = c
m.u = c
l.r = e
l.t = g
l.w = g
l.o = j
l.s = h
f.w = k
f.u = k
f.q = e
h.r = c
h.t = i
h.w = i
h.o = j
h.s = l
c.r = j
i.s = k
i.x = e
e.r = j
assert i.s.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

j.r = g
j.v = c
g.s = k
g.x = e
k.r = j
m.w = e
m.q = c
m.u = c
l.r = e
l.t = g
l.w = g
l.o = j
l.s = h
f.w = k
f.u = k
f.q = e
h.r = c
h.t = i
h.w = i
h.o = j
h.s = l
c.r = j
i.s = k
i.x = e
e.r = j
assert i.s.r.v.txt == "c"