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

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

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.y: A = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
g = C("g")
j = D("j")
e = E("e")
a = B("a")
c = D("c")
m = C("m")
h = E("h")
d = E("d")

k.u = j
k.v = c
k.y = g
k.z = d
k.q = n
n.o = d
n.x = e
n.z = g
n.v = a
n.y = m
g.o = m
g.t = m
g.q = m
g.y = k
g.s = k
j.v = e
j.y = c
e.u = d
e.w = k
a.o = e
a.x = d
a.z = m
a.v = n
a.y = g
c.v = h
c.y = j
m.o = g
m.t = g
m.q = g
m.y = k
m.s = k
h.u = d
h.w = k
d.u = h
d.w = k
assert g.t.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.y: C = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.y: A = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
g = C("g")
j = D("j")
e = E("e")
a = B("a")
c = D("c")
m = C("m")
h = E("h")
d = E("d")

k.u = j
k.v = c
k.y = g
k.z = d
k.q = n
n.o = d
n.x = e
n.z = g
n.v = a
n.y = m
g.o = m
g.t = m
g.q = m
g.y = k
g.s = k
j.v = e
j.y = c
e.u = d
e.w = k
a.o = e
a.x = d
a.z = m
a.v = n
a.y = g
c.v = h
c.y = j
m.o = g
m.t = g
m.q = g
m.y = k
m.s = k
h.u = d
h.w = k
d.u = h
d.w = k
assert g.t.s.y.txt == "g"