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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: F = None
        self.w: I = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: D = None
        self.s: G = None
        self.p: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: F = None
        self.w: I = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: D = None
        self.s: G = None
        self.p: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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