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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.s: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: H = None
        self.y: E = None
        self.s: B = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

b = A("b")
h = B("h")
g = C("g")
l = D("l")
i = E("i")
d = F("d")
e = G("e")
a = H("a")

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.s: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: H = None
        self.y: E = None
        self.s: B = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

b = A("b")
h = B("h")
g = C("g")
l = D("l")
i = E("i")
d = F("d")
e = G("e")
a = H("a")

b.s = l
b.t = i
b.o = a
h.x = d
g.r = a
g.y = a
g.z = e
g.q = l
g.t = d
l.p = i
l.u = g
i.z = d
i.r = d
i.s = a
i.v = e
i.p = b
d.w = i
d.t = g
d.y = g
d.s = b
d.u = b
e.r = d
e.v = a
e.y = i
e.z = i
e.s = h
e.u = l
a.w = d
assert d.u.t.p.s.txt == "l"