class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: C = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

h = A("h")
m = B("m")
b = C("b")
j = D("j")
k = E("k")
l = A("l")
g = C("g")
f = E("f")

h.u = j
h.w = j
h.s = g
h.v = m
m.p = j
m.v = l
b.u = m
b.v = m
b.z = k
b.q = f
b.s = j
j.v = l
j.u = l
j.q = b
k.y = m
k.w = h
k.o = l
k.x = f
l.u = j
l.w = j
l.s = b
l.v = m
g.u = m
g.v = m
g.z = k
g.q = k
g.s = j
f.y = m
f.w = l
f.o = l
f.x = k
assert f.o.s.s.q.q.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: C = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

h = A("h")
m = B("m")
b = C("b")
j = D("j")
k = E("k")
l = A("l")
g = C("g")
f = E("f")

h.u = j
h.w = j
h.s = g
h.v = m
m.p = j
m.v = l
b.u = m
b.v = m
b.z = k
b.q = f
b.s = j
j.v = l
j.u = l
j.q = b
k.y = m
k.w = h
k.o = l
k.x = f
l.u = j
l.w = j
l.s = b
l.v = m
g.u = m
g.v = m
g.z = k
g.q = k
g.s = j
f.y = m
f.w = l
f.o = l
f.x = k
assert f.o.s.s.q.q.y.p.txt == "j"