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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.r: D = None
        self.z: F = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.r: D = None
        self.z: F = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

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