class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

j.t = c
j.p = d
j.z = n
j.w = l
l.v = n
l.w = c
g.p = n
g.y = l
g.u = b
g.z = b
g.s = f
c.z = l
c.w = n
i.v = d
i.p = b
i.y = g
d.z = l
d.w = n
b.p = i
b.y = l
b.u = g
b.z = g
b.s = j
f.t = c
f.p = c
f.z = i
f.w = l
n.v = c
n.p = b
n.y = g
assert g.z.z.s.z.txt == "i"