class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.x: I = None
        self.s: D = None
        self.r: I = None
        self.u: D = None
        self.z: I = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.o: C = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.u: D = None
        self.q: B = None
        self.y: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: A = None
        self.q: B = None
        self.t: D = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.o: C = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.u: D = None
        self.q: B = None
        self.y: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: A = None
        self.q: B = None
        self.t: D = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

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

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