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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.y: E = None
        self.x: H = None
        self.q: I = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.z: B = None
        self.v: E = None
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.y: E = None
        self.x: H = None
        self.q: I = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: H = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.z: B = None
        self.v: E = None
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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