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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.r: J = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: I = None
        self.u: G = None
        self.w: E = None
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.t: J = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: B = None
        self.r: J = None
        self.p: E = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.r: J = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: I = None
        self.u: G = None
        self.w: E = None
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.t: J = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: B = None
        self.r: J = None
        self.p: E = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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