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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.u: D = None
        self.z: G = None
        self.r: D = None
        self.t: A = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.v: B = None
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

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

c = A("c")
g = B("g")
a = C("a")
b = D("b")
n = E("n")
h = F("h")
m = G("m")
k = H("k")
i = B("i")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.u: D = None
        self.z: G = None
        self.r: D = None
        self.t: A = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.v: B = None
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

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

c = A("c")
g = B("g")
a = C("a")
b = D("b")
n = E("n")
h = F("h")
m = G("m")
k = H("k")
i = B("i")

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