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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

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

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