class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: F = None
        self.q: G = None
        self.y: F = None
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: E = None
        self.x: G = None
        self.y: A = None
        self.p: A = None
        self.r: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.x: G = None
        self.u: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.x: B = None
        self.v: D = None
        self.w: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.txt = txt

a = A("a")
k = B("k")
f = C("f")
h = D("h")
i = E("i")
l = F("l")
g = G("g")
c = H("c")
d = A("d")

a.w = i
a.t = i
a.s = l
a.y = l
a.q = g
k.z = g
k.y = g
k.u = d
k.x = d
k.r = d
k.p = h
k.s = f
k.v = f
f.s = a
h.v = d
h.p = d
h.w = i
h.x = g
h.y = a
h.r = c
h.z = c
i.p = k
i.q = k
i.u = k
i.x = g
i.s = f
l.r = g
l.y = g
l.x = k
l.v = h
l.w = d
l.q = i
g.y = d
c.r = k
c.z = k
d.w = i
d.t = i
d.s = l
d.y = l
d.q = g
assert c.z.p.x.y.q.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: F = None
        self.q: G = None
        self.y: F = None
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: E = None
        self.x: G = None
        self.y: A = None
        self.p: A = None
        self.r: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.x: G = None
        self.u: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.x: B = None
        self.v: D = None
        self.w: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.txt = txt

a = A("a")
k = B("k")
f = C("f")
h = D("h")
i = E("i")
l = F("l")
g = G("g")
c = H("c")
d = A("d")

a.w = i
a.t = i
a.s = l
a.y = l
a.q = g
k.z = g
k.y = g
k.u = d
k.x = d
k.r = d
k.p = h
k.s = f
k.v = f
f.s = a
h.v = d
h.p = d
h.w = i
h.x = g
h.y = a
h.r = c
h.z = c
i.p = k
i.q = k
i.u = k
i.x = g
i.s = f
l.r = g
l.y = g
l.x = k
l.v = h
l.w = d
l.q = i
g.y = d
c.r = k
c.z = k
d.w = i
d.t = i
d.s = l
d.y = l
d.q = g
assert c.z.p.x.y.q.y.y.txt == "l"