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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.u: H = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: D = None
        self.s: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: G = None
        self.r: E = None
        self.t: A = None
        self.u: A = None
        self.s: D = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

a = A("a")
l = B("l")
m = C("m")
d = D("d")
h = E("h")
g = F("g")
i = G("i")
c = H("c")
f = G("f")

a.s = d
a.t = g
l.v = c
l.q = d
m.s = h
m.p = c
m.u = c
m.v = d
d.p = l
h.q = c
g.z = h
g.x = d
g.s = d
g.y = l
i.q = g
i.p = l
i.s = l
i.u = m
i.t = a
i.w = h
i.v = h
i.r = d
c.x = a
c.t = a
c.u = a
c.z = f
c.v = f
c.q = f
c.r = h
c.s = d
f.q = g
f.p = l
f.s = l
f.u = m
f.t = a
f.w = h
f.v = h
f.r = d
assert f.s.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.u: H = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: D = None
        self.s: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: G = None
        self.r: E = None
        self.t: A = None
        self.u: A = None
        self.s: D = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

a = A("a")
l = B("l")
m = C("m")
d = D("d")
h = E("h")
g = F("g")
i = G("i")
c = H("c")
f = G("f")

a.s = d
a.t = g
l.v = c
l.q = d
m.s = h
m.p = c
m.u = c
m.v = d
d.p = l
h.q = c
g.z = h
g.x = d
g.s = d
g.y = l
i.q = g
i.p = l
i.s = l
i.u = m
i.t = a
i.w = h
i.v = h
i.r = d
c.x = a
c.t = a
c.u = a
c.z = f
c.v = f
c.q = f
c.r = h
c.s = d
f.q = g
f.p = l
f.s = l
f.u = m
f.t = a
f.w = h
f.v = h
f.r = d
assert f.s.q.p.txt == "l"