class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.p: J = None
        self.u: B = None
        self.o: F = None
        self.y: E = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: D = None
        self.o: F = None
        self.s: J = None
        self.y: H = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.s: H = None
        self.y: J = None
        self.q: G = None
        self.z: H = None
        self.x: A = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: D = None
        self.o: F = None
        self.s: J = None
        self.y: H = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.s: H = None
        self.y: J = None
        self.q: G = None
        self.z: H = None
        self.x: A = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: C = None
        self.txt = txt

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

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

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

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