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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.z: F = None
        self.u: F = None
        self.q: D = None
        self.s: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.z: F = None
        self.u: F = None
        self.q: D = None
        self.s: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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