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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: D = None
        self.t: H = None
        self.r: F = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.y: G = None
        self.v: G = None
        self.u: H = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.o: A = None
        self.q: I = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: D = None
        self.t: H = None
        self.r: F = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.y: G = None
        self.v: G = None
        self.u: H = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.o: A = None
        self.q: I = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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