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

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

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

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

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

k = A("k")
b = B("b")
n = C("n")
m = D("m")
e = E("e")
g = A("g")
l = A("l")

k.y = n
k.u = n
k.q = l
k.t = m
k.x = e
b.t = l
b.u = g
b.q = n
b.y = n
b.w = n
n.y = m
n.u = g
n.v = e
m.y = n
m.t = e
e.x = n
e.z = b
e.p = m
g.y = n
g.u = n
g.q = k
g.t = m
g.x = e
l.y = n
l.u = n
l.q = g
l.t = m
l.x = e
assert b.u.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.t: D = None
        self.x: E = None
        self.u: C = None
        self.txt = txt

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

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

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

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

k = A("k")
b = B("b")
n = C("n")
m = D("m")
e = E("e")
g = A("g")
l = A("l")

k.y = n
k.u = n
k.q = l
k.t = m
k.x = e
b.t = l
b.u = g
b.q = n
b.y = n
b.w = n
n.y = m
n.u = g
n.v = e
m.y = n
m.t = e
e.x = n
e.z = b
e.p = m
g.y = n
g.u = n
g.q = k
g.t = m
g.x = e
l.y = n
l.u = n
l.q = g
l.t = m
l.x = e
assert b.u.u.v.txt == "e"