class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: B = None
        self.s: A = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: D = None
        self.q: B = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

i.u = h
i.x = b
i.s = j
i.y = j
i.t = l
b.s = f
b.o = f
b.y = f
b.q = h
b.u = l
a.y = f
a.z = i
a.w = i
a.s = k
g.u = l
g.s = j
g.x = f
l.p = g
j.u = h
j.x = b
j.s = i
j.y = i
j.t = l
f.u = l
f.s = j
f.x = g
e.u = b
e.x = b
e.s = i
e.y = i
e.t = l
h.s = f
h.o = f
h.q = b
h.y = g
h.u = l
k.y = f
k.z = i
k.s = a
k.w = j
assert j.x.u.p.s.t.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: B = None
        self.s: A = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: D = None
        self.q: B = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

i.u = h
i.x = b
i.s = j
i.y = j
i.t = l
b.s = f
b.o = f
b.y = f
b.q = h
b.u = l
a.y = f
a.z = i
a.w = i
a.s = k
g.u = l
g.s = j
g.x = f
l.p = g
j.u = h
j.x = b
j.s = i
j.y = i
j.t = l
f.u = l
f.s = j
f.x = g
e.u = b
e.x = b
e.s = i
e.y = i
e.t = l
h.s = f
h.o = f
h.q = b
h.y = g
h.u = l
k.y = f
k.z = i
k.s = a
k.w = j
assert j.x.u.p.s.t.p.x.txt == "f"