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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.u: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.s: G = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: B = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

f = A("f")
h = B("h")
j = C("j")
b = D("b")
c = E("c")
n = F("n")
e = G("e")
l = H("l")
g = F("g")

f.q = j
f.x = b
f.s = g
f.v = g
f.w = l
h.y = l
h.v = e
j.w = l
j.p = l
j.u = e
j.z = n
b.q = f
c.r = j
c.q = j
c.v = h
n.o = e
n.s = e
n.q = f
n.r = g
n.w = l
e.v = c
e.y = b
e.z = f
l.w = f
l.u = f
l.t = h
l.p = c
g.o = e
g.s = e
g.q = f
g.r = n
g.w = l
assert f.w.t.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.s: F = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.u: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.s: G = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: B = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

f = A("f")
h = B("h")
j = C("j")
b = D("b")
c = E("c")
n = F("n")
e = G("e")
l = H("l")
g = F("g")

f.q = j
f.x = b
f.s = g
f.v = g
f.w = l
h.y = l
h.v = e
j.w = l
j.p = l
j.u = e
j.z = n
b.q = f
c.r = j
c.q = j
c.v = h
n.o = e
n.s = e
n.q = f
n.r = g
n.w = l
e.v = c
e.y = b
e.z = f
l.w = f
l.u = f
l.t = h
l.p = c
g.o = e
g.s = e
g.q = f
g.r = n
g.w = l
assert f.w.t.y.p.txt == "c"