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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: A = None
        self.u: J = None
        self.s: A = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: J = None
        self.t: C = None
        self.x: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: A = None
        self.u: J = None
        self.s: A = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: J = None
        self.t: C = None
        self.x: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.txt = txt

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

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