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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.u: G = None
        self.x: A = None
        self.o: F = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.r: C = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

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

n = A("n")
j = B("j")
k = C("k")
c = D("c")
d = E("d")
l = F("l")
m = G("m")
a = H("a")
g = E("g")
e = B("e")

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.u: G = None
        self.x: A = None
        self.o: F = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.r: C = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

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

n = A("n")
j = B("j")
k = C("k")
c = D("c")
d = E("d")
l = F("l")
m = G("m")
a = H("a")
g = E("g")
e = B("e")

n.r = l
n.s = l
n.w = d
n.o = a
n.y = g
n.v = j
n.p = m
n.q = c
j.u = a
j.x = m
j.y = e
j.t = e
j.v = l
k.s = m
k.t = g
k.z = c
c.v = d
c.z = e
c.u = m
c.x = n
c.s = n
c.o = l
d.v = k
d.t = n
d.z = n
l.o = k
l.r = k
l.z = m
l.u = d
l.q = d
m.y = e
m.o = n
a.y = c
a.z = c
a.s = c
a.q = j
a.x = n
a.w = g
a.r = m
g.v = k
g.t = n
g.z = n
e.u = a
e.x = m
e.y = j
e.t = j
e.v = l
assert a.q.t.y.txt == "j"