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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: B = None
        self.u: D = None
        self.p: B = None
        self.x: H = None
        self.q: B = None
        self.r: G = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: H = None
        self.q: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: B = None
        self.u: D = None
        self.p: B = None
        self.x: H = None
        self.q: B = None
        self.r: G = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: H = None
        self.q: C = None
        self.t: C = None
        self.txt = txt

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

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

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