class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.u: F = None
        self.t: D = None
        self.s: B = None
        self.y: B = None
        self.txt = txt

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

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

d = A("d")
m = B("m")
e = C("e")
i = D("i")
l = E("l")
g = F("g")
a = E("a")
f = D("f")
k = A("k")

d.r = g
d.w = i
d.v = i
d.y = f
m.v = i
e.p = m
i.r = f
i.t = f
i.x = m
i.s = m
i.y = m
i.u = g
l.o = i
l.v = a
g.w = a
g.y = a
g.z = m
g.p = m
g.r = d
g.t = k
a.o = i
a.v = l
f.r = i
f.t = i
f.x = m
f.s = m
f.y = m
f.u = g
k.r = g
k.w = f
k.y = i
k.v = i
assert l.v.o.x.v.t.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.u: F = None
        self.t: D = None
        self.s: B = None
        self.y: B = None
        self.txt = txt

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

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

d = A("d")
m = B("m")
e = C("e")
i = D("i")
l = E("l")
g = F("g")
a = E("a")
f = D("f")
k = A("k")

d.r = g
d.w = i
d.v = i
d.y = f
m.v = i
e.p = m
i.r = f
i.t = f
i.x = m
i.s = m
i.y = m
i.u = g
l.o = i
l.v = a
g.w = a
g.y = a
g.z = m
g.p = m
g.r = d
g.t = k
a.o = i
a.v = l
f.r = i
f.t = i
f.x = m
f.s = m
f.y = m
f.u = g
k.r = g
k.w = f
k.y = i
k.v = i
assert l.v.o.x.v.t.r.u.r.txt == "d"