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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.s: E = None
        self.w: B = None
        self.p: A = None
        self.z: E = None
        self.o: D = None
        self.txt = txt

m = A("m")
a = B("a")
b = C("b")
j = D("j")
f = E("f")
g = F("g")
h = G("h")
l = H("l")

m.x = b
m.s = g
a.o = h
a.z = f
b.u = l
j.x = g
f.o = m
f.p = j
g.p = h
g.o = j
g.q = j
h.u = a
l.u = b
l.x = b
l.s = f
l.z = f
l.w = a
l.p = m
l.o = j
assert a.z.p.x.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.s: E = None
        self.w: B = None
        self.p: A = None
        self.z: E = None
        self.o: D = None
        self.txt = txt

m = A("m")
a = B("a")
b = C("b")
j = D("j")
f = E("f")
g = F("g")
h = G("h")
l = H("l")

m.x = b
m.s = g
a.o = h
a.z = f
b.u = l
j.x = g
f.o = m
f.p = j
g.p = h
g.o = j
g.q = j
h.u = a
l.u = b
l.x = b
l.s = f
l.z = f
l.w = a
l.p = m
l.o = j
assert a.z.p.x.p.u.txt == "a"