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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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