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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: D = None
        self.t: B = None
        self.x: J = None
        self.r: B = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.x: B = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: I = None
        self.y: A = None
        self.o: I = None
        self.u: E = None
        self.r: E = None
        self.w: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: D = None
        self.t: B = None
        self.x: J = None
        self.r: B = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.x: B = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: I = None
        self.y: A = None
        self.o: I = None
        self.u: E = None
        self.r: E = None
        self.w: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

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