class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.p: B = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

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

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

n = A("n")
g = B("g")
c = C("c")
f = D("f")
j = E("j")
l = B("l")
e = C("e")
b = D("b")

n.t = c
n.x = c
g.v = f
g.t = f
g.w = b
g.y = b
g.p = l
c.v = n
c.q = l
c.y = f
c.o = j
f.o = j
j.y = f
j.z = c
j.o = l
l.v = f
l.w = f
l.y = f
l.p = g
l.t = b
e.v = n
e.q = g
e.y = b
e.o = j
b.o = j
assert e.q.w.o.o.v.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.p: B = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

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

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

n = A("n")
g = B("g")
c = C("c")
f = D("f")
j = E("j")
l = B("l")
e = C("e")
b = D("b")

n.t = c
n.x = c
g.v = f
g.t = f
g.w = b
g.y = b
g.p = l
c.v = n
c.q = l
c.y = f
c.o = j
f.o = j
j.y = f
j.z = c
j.o = l
l.v = f
l.w = f
l.y = f
l.p = g
l.t = b
e.v = n
e.q = g
e.y = b
e.o = j
b.o = j
assert e.q.w.o.o.v.o.z.txt == "c"