class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.p: H = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: J = None
        self.q: J = None
        self.v: A = None
        self.r: G = None
        self.t: G = None
        self.o: A = None
        self.y: F = None
        self.u: D = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: I = None
        self.r: H = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: J = None
        self.v: B = None
        self.s: C = None
        self.q: C = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: J = None
        self.t: G = None
        self.y: E = None
        self.r: G = None
        self.w: I = None
        self.v: D = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.y: B = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.s: C = None
        self.y: I = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: A = None
        self.txt = txt

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

g.y = e
g.t = i
g.p = h
g.w = h
g.q = m
j.p = b
j.z = b
j.q = b
j.v = g
j.o = g
j.r = f
j.t = f
j.y = i
j.u = e
j.w = h
m.y = h
m.v = i
e.o = b
e.p = k
e.r = h
e.z = g
c.p = e
c.t = b
c.v = j
c.s = m
c.q = m
c.w = g
c.r = h
i.z = b
i.p = b
i.t = f
i.r = f
i.y = c
i.s = c
i.w = k
i.v = e
i.o = m
f.z = m
f.q = k
f.y = j
f.u = e
f.o = h
h.o = g
h.t = f
h.s = m
h.q = m
h.y = k
k.r = i
k.q = e
b.p = e
b.w = g
assert g.t.o.v.v.p.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.p: H = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: J = None
        self.q: J = None
        self.v: A = None
        self.r: G = None
        self.t: G = None
        self.o: A = None
        self.y: F = None
        self.u: D = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: I = None
        self.r: H = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: J = None
        self.v: B = None
        self.s: C = None
        self.q: C = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: J = None
        self.t: G = None
        self.y: E = None
        self.r: G = None
        self.w: I = None
        self.v: D = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.y: B = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.s: C = None
        self.y: I = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: A = None
        self.txt = txt

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

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