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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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