class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.q: B = None
        self.s: E = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: C = None
        self.t: D = None
        self.u: E = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.q: A = None
        self.s: B = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.q: B = None
        self.s: E = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: C = None
        self.t: D = None
        self.u: E = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.q: A = None
        self.s: B = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

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

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