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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: H = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.w: F = None
        self.t: C = None
        self.p: F = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.t: B = None
        self.y: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: H = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.w: F = None
        self.t: C = None
        self.p: F = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.t: B = None
        self.y: B = None
        self.r: F = None
        self.txt = txt

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

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

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