class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: H = None
        self.t: C = None
        self.s: G = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: G = None
        self.r: J = None
        self.s: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.w: I = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: G = None
        self.r: J = None
        self.s: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.w: I = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

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

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