class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: F = None
        self.x: E = None
        self.o: J = None
        self.t: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.o: B = None
        self.t: H = None
        self.v: J = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: I = None
        self.t: I = None
        self.y: E = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.z: E = None
        self.t: C = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.o: B = None
        self.t: H = None
        self.v: J = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: I = None
        self.t: I = None
        self.y: E = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.z: E = None
        self.t: C = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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