class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: C = None
        self.u: C = None
        self.y: H = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: F = None
        self.u: A = None
        self.x: I = None
        self.s: F = None
        self.z: J = None
        self.q: I = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: F = None
        self.u: A = None
        self.x: I = None
        self.s: F = None
        self.z: J = None
        self.q: I = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

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

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

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