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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: B = None
        self.s: F = None
        self.q: D = None
        self.o: F = None
        self.v: B = None
        self.x: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: B = None
        self.s: F = None
        self.q: D = None
        self.o: F = None
        self.v: B = None
        self.x: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.y: D = None
        self.txt = txt

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

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

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