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

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

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

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

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

j = A("j")
n = B("n")
k = C("k")
g = D("g")
i = E("i")
e = A("e")

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

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

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

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

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

j = A("j")
n = B("n")
k = C("k")
g = D("g")
i = E("i")
e = A("e")

j.t = n
j.p = n
j.y = n
j.v = n
j.u = i
n.w = e
n.p = e
n.o = e
n.x = k
n.y = g
k.q = n
g.z = i
i.u = n
e.t = n
e.p = n
e.y = n
e.v = n
e.u = i
assert j.u.u.y.txt == "g"