class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.r: B = None
        self.v: B = None
        self.o: D = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.t: D = None
        self.p: D = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.t: F = None
        self.txt = txt

j = A("j")
n = B("n")
h = C("h")
d = D("d")
b = E("b")
l = F("l")
g = G("g")
i = A("i")
a = F("a")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.t: D = None
        self.p: D = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.t: F = None
        self.txt = txt

j = A("j")
n = B("n")
h = C("h")
d = D("d")
b = E("b")
l = F("l")
g = G("g")
i = A("i")
a = F("a")

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