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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.r: B = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

l = A("l")
j = B("j")
d = C("d")
i = D("i")
e = E("e")
n = F("n")
m = F("m")
k = D("k")
c = C("c")
a = E("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.r: B = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

l = A("l")
j = B("j")
d = C("d")
i = D("i")
e = E("e")
n = F("n")
m = F("m")
k = D("k")
c = C("c")
a = E("a")

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