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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: E = None
        self.x: I = None
        self.s: H = None
        self.v: C = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.z: F = None
        self.x: I = None
        self.q: B = None
        self.u: B = None
        self.t: G = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: A = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: E = None
        self.x: I = None
        self.s: H = None
        self.v: C = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.z: F = None
        self.x: I = None
        self.q: B = None
        self.u: B = None
        self.t: G = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: A = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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