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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.p: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.u: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: A = None
        self.s: B = None
        self.y: G = None
        self.z: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.v: C = None
        self.z: H = None
        self.o: H = None
        self.x: B = None
        self.txt = txt

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

m = A("m")
h = B("h")
b = C("b")
i = D("i")
k = E("k")
n = F("n")
f = G("f")
d = H("d")
c = G("c")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.p: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.u: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: A = None
        self.s: B = None
        self.y: G = None
        self.z: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.v: C = None
        self.z: H = None
        self.o: H = None
        self.x: B = None
        self.txt = txt

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

m = A("m")
h = B("h")
b = C("b")
i = D("i")
k = E("k")
n = F("n")
f = G("f")
d = H("d")
c = G("c")
a = D("a")

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