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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.s: D = None
        self.q: C = None
        self.z: G = None
        self.w: G = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.s: G = None
        self.r: C = None
        self.u: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.s: D = None
        self.q: C = None
        self.z: G = None
        self.w: G = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.s: G = None
        self.r: C = None
        self.u: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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