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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: A = None
        self.s: C = None
        self.o: H = None
        self.q: F = None
        self.y: C = None
        self.r: C = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: A = None
        self.p: A = None
        self.x: G = None
        self.y: B = None
        self.u: F = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.w: C = None
        self.u: E = None
        self.o: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: A = None
        self.s: C = None
        self.o: H = None
        self.q: F = None
        self.y: C = None
        self.r: C = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: A = None
        self.p: A = None
        self.x: G = None
        self.y: B = None
        self.u: F = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.w: C = None
        self.u: E = None
        self.o: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.txt = txt

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

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