class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.y: D = None
        self.v: D = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: H = None
        self.y: I = None
        self.x: I = None
        self.v: F = None
        self.s: B = None
        self.t: D = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.x: A = None
        self.u: F = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: D = None
        self.x: B = None
        self.r: D = None
        self.t: B = None
        self.y: B = None
        self.w: I = None
        self.p: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.q: F = None
        self.z: G = None
        self.v: I = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

b = A("b")
k = B("k")
l = C("l")
f = D("f")
m = E("m")
a = F("a")
g = G("g")
j = H("j")
d = I("d")
n = J("n")

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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: H = None
        self.y: I = None
        self.x: I = None
        self.v: F = None
        self.s: B = None
        self.t: D = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.x: A = None
        self.u: F = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: D = None
        self.x: B = None
        self.r: D = None
        self.t: B = None
        self.y: B = None
        self.w: I = None
        self.p: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.q: F = None
        self.z: G = None
        self.v: I = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

b = A("b")
k = B("k")
l = C("l")
f = D("f")
m = E("m")
a = F("a")
g = G("g")
j = H("j")
d = I("d")
n = J("n")

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