class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: I = None
        self.w: A = None
        self.t: A = None
        self.r: D = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.v: B = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.u: D = None
        self.q: E = None
        self.t: D = None
        self.o: G = None
        self.z: B = None
        self.v: G = None
        self.txt = txt

j = A("j")
m = B("m")
f = C("f")
l = D("l")
n = E("n")
c = F("c")
e = G("e")
g = H("g")
d = I("d")

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: I = None
        self.w: A = None
        self.t: A = None
        self.r: D = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.v: B = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.u: D = None
        self.q: E = None
        self.t: D = None
        self.o: G = None
        self.z: B = None
        self.v: G = None
        self.txt = txt

j = A("j")
m = B("m")
f = C("f")
l = D("l")
n = E("n")
c = F("c")
e = G("e")
g = H("g")
d = I("d")

j.o = e
m.y = e
f.s = j
f.w = j
f.t = j
f.u = d
f.r = l
f.p = g
f.x = c
l.t = j
l.s = d
n.w = m
n.u = f
n.y = l
c.t = l
c.s = m
c.x = j
c.v = d
c.z = g
c.y = g
c.w = g
e.q = c
e.w = c
e.v = m
e.p = g
g.v = c
g.s = c
g.w = l
d.w = c
d.r = l
d.u = l
d.t = l
d.q = n
d.o = e
d.v = e
d.z = m
assert c.s.y.p.v.y.v.s.y.q.txt == "c"