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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: H = None
        self.p: C = None
        self.u: F = None
        self.v: G = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: G = None
        self.v: A = None
        self.q: H = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: H = None
        self.z: H = None
        self.u: G = None
        self.v: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: H = None
        self.p: C = None
        self.u: F = None
        self.v: G = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: G = None
        self.v: A = None
        self.q: H = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: H = None
        self.z: H = None
        self.u: G = None
        self.v: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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