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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.txt = txt

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

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