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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.v: H = None
        self.z: D = None
        self.x: D = None
        self.q: A = None
        self.t: A = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.u: D = None
        self.r: H = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

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

c = A("c")
a = B("a")
k = C("k")
d = D("d")
h = E("h")
f = F("f")
l = G("l")
n = H("n")
j = B("j")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.v: H = None
        self.z: D = None
        self.x: D = None
        self.q: A = None
        self.t: A = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.u: D = None
        self.r: H = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

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

c = A("c")
a = B("a")
k = C("k")
d = D("d")
h = E("h")
f = F("f")
l = G("l")
n = H("n")
j = B("j")

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