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

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

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

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

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

g = A("g")
f = B("f")
l = C("l")
n = D("n")
m = E("m")
a = E("a")
c = E("c")
b = C("b")
k = B("k")

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

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

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

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

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

g = A("g")
f = B("f")
l = C("l")
n = D("n")
m = E("m")
a = E("a")
c = E("c")
b = C("b")
k = B("k")

g.y = f
g.p = b
g.u = b
g.z = n
g.v = c
f.w = l
f.x = l
f.u = g
f.t = n
l.y = k
n.x = b
n.y = g
m.o = f
m.x = n
m.u = n
m.w = a
a.o = f
a.x = n
a.u = n
a.w = m
c.o = k
c.x = n
c.u = n
c.w = m
b.y = k
k.w = l
k.x = b
k.u = g
k.t = n
assert l.y.u.z.x.y.t.txt == "n"