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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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