class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.p: H = None
        self.t: G = None
        self.x: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.s: C = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.p: H = None
        self.t: G = None
        self.x: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.s: C = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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