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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: I = None
        self.q: G = None
        self.r: E = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.z: E = None
        self.v: D = None
        self.o: F = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.p: D = None
        self.r: D = None
        self.q: C = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: I = None
        self.q: G = None
        self.r: E = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.z: E = None
        self.v: D = None
        self.o: F = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.p: D = None
        self.r: D = None
        self.q: C = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

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

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