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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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