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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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