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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.v: D = None
        self.z: D = None
        self.t: E = None
        self.p: G = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: G = None
        self.v: C = None
        self.w: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.v: D = None
        self.z: D = None
        self.t: E = None
        self.p: G = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: G = None
        self.v: C = None
        self.w: C = None
        self.t: F = None
        self.txt = txt

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

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

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