class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.p: A = None
        self.w: C = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.r: B = None
        self.q: E = None
        self.x: F = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

k = A("k")
b = B("b")
d = C("d")
g = D("g")
a = E("a")
m = F("m")
l = G("l")
i = H("i")

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.p: A = None
        self.w: C = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.r: B = None
        self.q: E = None
        self.x: F = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

k = A("k")
b = B("b")
d = C("d")
g = D("g")
a = E("a")
m = F("m")
l = G("l")
i = H("i")

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