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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

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

a.u = j
a.o = e
f.z = g
f.w = j
f.r = a
f.v = d
h.v = e
h.s = b
h.t = i
h.p = a
b.q = i
b.s = i
b.t = d
b.w = d
i.p = e
i.s = e
i.q = e
i.r = j
n.u = g
n.o = f
j.v = f
j.s = b
j.t = i
j.p = a
d.q = i
d.s = i
d.t = b
d.w = b
e.z = h
e.w = j
e.r = a
e.v = b
g.v = f
g.s = d
g.t = i
g.p = n
assert i.q.v.t.t.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

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

a.u = j
a.o = e
f.z = g
f.w = j
f.r = a
f.v = d
h.v = e
h.s = b
h.t = i
h.p = a
b.q = i
b.s = i
b.t = d
b.w = d
i.p = e
i.s = e
i.q = e
i.r = j
n.u = g
n.o = f
j.v = f
j.s = b
j.t = i
j.p = a
d.q = i
d.s = i
d.t = b
d.w = b
e.z = h
e.w = j
e.r = a
e.v = b
g.v = f
g.s = d
g.t = i
g.p = n
assert i.q.v.t.t.s.r.txt == "j"