class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: G = None
        self.o: C = None
        self.u: E = None
        self.t: C = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: I = None
        self.v: E = None
        self.s: D = None
        self.o: G = None
        self.t: C = None
        self.z: D = None
        self.y: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.p: A = None
        self.x: F = None
        self.t: F = None
        self.v: C = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: G = None
        self.o: C = None
        self.u: E = None
        self.t: C = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.x: I = None
        self.v: E = None
        self.s: D = None
        self.o: G = None
        self.t: C = None
        self.z: D = None
        self.y: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.p: A = None
        self.x: F = None
        self.t: F = None
        self.v: C = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

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

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

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