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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

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

g = A("g")
l = B("l")
e = C("e")
h = D("h")
i = E("i")
d = F("d")
f = G("f")
k = H("k")
m = D("m")

g.u = m
g.r = e
g.y = i
g.s = l
g.o = f
g.t = h
g.q = k
l.u = e
l.x = f
l.o = k
l.v = k
l.r = g
e.o = d
e.y = l
e.s = f
h.q = f
h.o = g
h.u = e
i.y = l
i.o = k
d.r = l
d.p = e
d.q = g
f.z = k
f.y = d
f.p = m
f.t = i
k.p = e
k.z = i
k.q = f
k.x = h
k.w = l
k.s = m
m.q = f
m.o = g
m.u = e
assert h.q.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.y: E = None
        self.s: B = None
        self.o: G = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

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

g = A("g")
l = B("l")
e = C("e")
h = D("h")
i = E("i")
d = F("d")
f = G("f")
k = H("k")
m = D("m")

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