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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.w: C = None
        self.t: D = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: J = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: B = None
        self.v: H = None
        self.u: D = None
        self.x: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.s: I = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.t: D = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.w: C = None
        self.t: D = None
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: J = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: B = None
        self.v: H = None
        self.u: D = None
        self.x: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.s: I = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.t: D = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.txt = txt

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

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