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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: H = None
        self.r: H = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: G = None
        self.w: D = None
        self.y: F = None
        self.o: F = None
        self.r: F = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.q: D = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: H = None
        self.r: H = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: G = None
        self.w: D = None
        self.y: F = None
        self.o: F = None
        self.r: F = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.q: D = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

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

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