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

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

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

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

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

i = A("i")
n = B("n")
k = C("k")
g = D("g")
c = E("c")
l = A("l")
b = A("b")

i.x = l
i.v = l
i.u = g
i.o = n
i.y = c
n.w = b
n.x = b
k.p = i
k.y = n
g.p = c
g.z = c
g.u = c
g.s = k
g.q = b
c.z = k
c.p = k
c.u = n
l.x = i
l.v = i
l.u = g
l.o = n
l.y = c
b.x = i
b.u = g
b.o = n
b.v = l
b.y = c
assert i.o.x.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.o: B = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

i = A("i")
n = B("n")
k = C("k")
g = D("g")
c = E("c")
l = A("l")
b = A("b")

i.x = l
i.v = l
i.u = g
i.o = n
i.y = c
n.w = b
n.x = b
k.p = i
k.y = n
g.p = c
g.z = c
g.u = c
g.s = k
g.q = b
c.z = k
c.p = k
c.u = n
l.x = i
l.v = i
l.u = g
l.o = n
l.y = c
b.x = i
b.u = g
b.o = n
b.v = l
b.y = c
assert i.o.x.u.q.txt == "b"