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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: I = None
        self.u: A = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.o: B = None
        self.p: C = None
        self.t: H = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: J = None
        self.y: J = None
        self.o: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: I = None
        self.u: A = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.o: B = None
        self.p: C = None
        self.t: H = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: J = None
        self.y: J = None
        self.o: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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