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

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

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

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

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

e = A("e")
g = B("g")
a = C("a")
j = D("j")
n = E("n")
m = C("m")
b = D("b")
f = A("f")
h = E("h")

e.v = b
g.t = e
g.q = a
a.q = f
a.y = f
a.t = e
j.q = g
j.w = g
j.z = g
j.t = h
n.w = h
n.v = f
n.t = a
n.o = m
n.u = e
m.q = e
m.y = e
m.t = f
b.q = g
b.w = g
b.z = g
b.t = h
f.v = j
h.w = n
h.v = f
h.t = m
h.o = a
h.u = e
assert g.t.v.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

e = A("e")
g = B("g")
a = C("a")
j = D("j")
n = E("n")
m = C("m")
b = D("b")
f = A("f")
h = E("h")

e.v = b
g.t = e
g.q = a
a.q = f
a.y = f
a.t = e
j.q = g
j.w = g
j.z = g
j.t = h
n.w = h
n.v = f
n.t = a
n.o = m
n.u = e
m.q = e
m.y = e
m.t = f
b.q = g
b.w = g
b.z = g
b.t = h
f.v = j
h.w = n
h.v = f
h.t = m
h.o = a
h.u = e
assert g.t.v.q.t.txt == "e"