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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: I = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.x: C = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: I = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.x: C = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

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

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