class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.q: E = None
        self.y: B = None
        self.p: I = None
        self.o: C = None
        self.s: F = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: C = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: C = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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