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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.y: C = None
        self.w: G = None
        self.p: D = None
        self.t: E = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.y: C = None
        self.w: G = None
        self.p: D = None
        self.t: E = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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