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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.x: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: D = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.o: D = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.x: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: D = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.o: D = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

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