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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: H = None
        self.z: G = None
        self.p: F = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.w: H = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: E = None
        self.x: G = None
        self.y: A = None
        self.q: F = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: H = None
        self.z: G = None
        self.p: F = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.w: H = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: E = None
        self.x: G = None
        self.y: A = None
        self.q: F = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

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

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