class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: D = None
        self.r: E = None
        self.y: H = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: A = None
        self.o: C = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: I = None
        self.t: D = None
        self.q: F = None
        self.x: A = None
        self.y: D = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.y: G = None
        self.s: B = None
        self.o: C = None
        self.x: I = None
        self.u: J = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: A = None
        self.o: C = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: I = None
        self.t: D = None
        self.q: F = None
        self.x: A = None
        self.y: D = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.y: G = None
        self.s: B = None
        self.o: C = None
        self.x: I = None
        self.u: J = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

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

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

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

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