class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.r: B = None
        self.z: C = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.x: I = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.w: F = None
        self.p: C = None
        self.v: H = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.x: I = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.w: F = None
        self.p: C = None
        self.v: H = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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