class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: I = None
        self.t: F = None
        self.o: D = None
        self.p: D = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.o: A = None
        self.t: I = None
        self.x: H = None
        self.q: A = None
        self.w: F = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.s: G = None
        self.v: F = None
        self.t: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.z: B = None
        self.q: A = None
        self.t: C = None
        self.s: F = None
        self.w: C = None
        self.x: D = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.s: C = None
        self.o: B = None
        self.r: A = None
        self.x: H = None
        self.p: D = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

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

l.z = g
l.w = d
l.t = h
l.s = h
l.o = m
l.p = m
n.r = m
n.p = d
n.t = d
n.o = l
n.q = l
n.x = g
n.y = g
n.w = h
f.w = m
f.r = e
f.t = h
m.y = g
j.z = h
j.v = h
j.u = f
j.s = k
j.t = d
h.t = f
k.u = l
k.r = n
k.y = g
g.r = l
g.y = l
g.q = l
g.z = n
g.t = f
g.w = f
g.s = h
g.x = m
g.u = d
d.z = m
d.p = m
d.v = f
d.s = f
d.t = f
d.o = n
d.r = l
d.x = g
d.y = j
e.z = h
e.v = h
e.u = f
e.s = k
e.t = d
assert k.u.p.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: I = None
        self.t: F = None
        self.o: D = None
        self.p: D = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.o: A = None
        self.t: I = None
        self.x: H = None
        self.q: A = None
        self.w: F = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.s: G = None
        self.v: F = None
        self.t: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.z: B = None
        self.q: A = None
        self.t: C = None
        self.s: F = None
        self.w: C = None
        self.x: D = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.s: C = None
        self.o: B = None
        self.r: A = None
        self.x: H = None
        self.p: D = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

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

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