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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.o: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: F = None
        self.z: A = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: H = None
        self.o: D = None
        self.t: G = None
        self.u: D = None
        self.y: G = None
        self.q: G = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

g = A("g")
h = B("h")
l = C("l")
a = D("a")
k = E("k")
m = F("m")
b = G("b")
e = H("e")
i = I("i")
d = J("d")

g.s = m
g.r = m
g.q = l
g.z = l
g.p = l
g.w = a
g.y = k
g.t = h
h.y = g
l.t = m
l.v = k
l.o = d
a.v = l
a.o = k
a.x = k
a.y = h
k.y = b
k.v = m
k.z = g
k.q = i
m.o = k
m.t = k
m.s = g
m.v = b
b.r = k
b.t = a
e.w = i
e.t = g
e.x = g
i.r = d
i.x = e
i.o = a
i.u = a
i.p = a
i.t = b
i.y = b
i.q = b
i.v = k
d.p = a
assert d.p.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.w: D = None
        self.y: E = None
        self.z: C = None
        self.p: C = None
        self.r: F = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.o: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: F = None
        self.z: A = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: H = None
        self.o: D = None
        self.t: G = None
        self.u: D = None
        self.y: G = None
        self.q: G = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

g = A("g")
h = B("h")
l = C("l")
a = D("a")
k = E("k")
m = F("m")
b = G("b")
e = H("e")
i = I("i")
d = J("d")

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