class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.v: J = None
        self.u: F = None
        self.p: F = None
        self.t: E = None
        self.w: B = None
        self.z: J = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.t: A = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: A = None
        self.t: A = None
        self.y: F = None
        self.z: A = None
        self.u: E = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: E = None
        self.o: H = None
        self.w: B = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.t: A = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: A = None
        self.t: A = None
        self.y: F = None
        self.z: A = None
        self.u: E = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: E = None
        self.o: H = None
        self.w: B = None
        self.t: H = None
        self.txt = txt

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

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