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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.q: C = None
        self.t: G = None
        self.v: C = None
        self.x: G = None
        self.u: E = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: A = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: D = None
        self.q: D = None
        self.u: C = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.o: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.q: C = None
        self.t: G = None
        self.v: C = None
        self.x: G = None
        self.u: E = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: A = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: D = None
        self.q: D = None
        self.u: C = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.o: B = None
        self.p: D = None
        self.txt = txt

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

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

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