class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: E = None
        self.p: C = None
        self.t: H = None
        self.x: G = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.w: E = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.w: E = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

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