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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

h = A("h")
a = B("a")
l = C("l")
k = D("k")
c = D("c")
e = B("e")
j = A("j")
d = C("d")
g = B("g")
f = A("f")

h.w = d
h.p = c
a.v = f
a.x = l
a.p = l
a.y = g
l.t = d
l.v = d
l.z = e
k.z = f
k.s = c
k.q = a
k.y = d
c.z = f
c.s = k
c.q = g
c.y = d
e.v = j
e.x = l
e.p = l
e.y = a
j.w = d
j.p = c
d.t = l
d.v = l
d.z = g
g.v = j
g.x = l
g.p = l
g.y = e
f.w = l
f.p = c
assert h.p.y.t.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

h = A("h")
a = B("a")
l = C("l")
k = D("k")
c = D("c")
e = B("e")
j = A("j")
d = C("d")
g = B("g")
f = A("f")

h.w = d
h.p = c
a.v = f
a.x = l
a.p = l
a.y = g
l.t = d
l.v = d
l.z = e
k.z = f
k.s = c
k.q = a
k.y = d
c.z = f
c.s = k
c.q = g
c.y = d
e.v = j
e.x = l
e.p = l
e.y = a
j.w = d
j.p = c
d.t = l
d.v = l
d.z = g
g.v = j
g.x = l
g.p = l
g.y = e
f.w = l
f.p = c
assert h.p.y.t.z.v.txt == "j"