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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.x: E = None
        self.v: F = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.v: H = None
        self.q: A = None
        self.w: C = None
        self.s: C = None
        self.o: C = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: A = None
        self.r: E = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

a = A("a")
b = B("b")
f = C("f")
i = D("i")
h = E("h")
d = F("d")
k = G("k")
n = H("n")
l = C("l")

a.u = k
a.w = h
a.p = h
a.v = f
a.t = d
b.p = i
f.z = n
i.z = b
i.p = b
i.u = n
i.x = h
i.v = d
h.o = f
h.s = n
h.z = a
h.v = a
d.r = n
d.v = n
d.z = k
d.q = a
d.w = l
d.o = l
d.s = f
d.u = i
k.s = d
n.y = h
n.r = h
n.z = h
n.t = a
n.v = b
l.z = n
assert l.z.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.p: E = None
        self.v: C = None
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.x: E = None
        self.v: F = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.v: H = None
        self.q: A = None
        self.w: C = None
        self.s: C = None
        self.o: C = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: A = None
        self.r: E = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

a = A("a")
b = B("b")
f = C("f")
i = D("i")
h = E("h")
d = F("d")
k = G("k")
n = H("n")
l = C("l")

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