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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.u: E = None
        self.t: E = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.txt = txt

a = A("a")
e = B("e")
l = C("l")
g = D("g")
k = E("k")
b = F("b")
c = G("c")
f = H("f")
h = G("h")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.u: E = None
        self.t: E = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.txt = txt

a = A("a")
e = B("e")
l = C("l")
g = D("g")
k = E("k")
b = F("b")
c = G("c")
f = H("f")
h = G("h")

a.o = l
a.t = l
a.u = l
a.w = l
a.p = b
a.r = b
a.x = f
a.y = f
e.y = b
l.u = a
l.x = a
l.s = f
l.q = b
g.y = f
g.r = e
k.o = e
k.u = g
b.x = g
b.q = f
b.v = k
b.z = h
c.r = k
c.u = k
c.t = k
c.y = k
c.q = f
c.o = h
f.o = e
f.v = b
h.r = k
h.u = k
h.t = k
h.y = k
h.q = f
h.o = c
assert l.u.x.v.q.txt == "f"