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

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

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

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

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

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

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

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

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

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

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

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

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