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

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

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

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

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

e = A("e")
b = B("b")
l = C("l")
n = D("n")
d = E("d")
a = A("a")
c = B("c")
f = E("f")
g = B("g")
k = E("k")

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

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

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

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

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

e = A("e")
b = B("b")
l = C("l")
n = D("n")
d = E("d")
a = A("a")
c = B("c")
f = E("f")
g = B("g")
k = E("k")

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