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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.w: F = None
        self.q: E = None
        self.r: E = None
        self.p: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: G = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.w: F = None
        self.q: E = None
        self.r: E = None
        self.p: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: G = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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