class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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