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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.q: H = None
        self.u: D = None
        self.t: F = None
        self.y: J = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: J = None
        self.t: J = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: G = None
        self.v: B = None
        self.z: B = None
        self.s: D = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.q: H = None
        self.u: D = None
        self.t: F = None
        self.y: J = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: J = None
        self.t: J = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: G = None
        self.v: B = None
        self.z: B = None
        self.s: D = None
        self.x: A = None
        self.txt = txt

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

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