class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.u: C = None
        self.v: J = None
        self.p: H = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: B = None
        self.r: G = None
        self.u: C = None
        self.p: A = None
        self.t: B = None
        self.y: J = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: J = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.u: C = None
        self.v: J = None
        self.p: H = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: B = None
        self.r: G = None
        self.u: C = None
        self.p: A = None
        self.t: B = None
        self.y: J = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: J = None
        self.o: D = None
        self.txt = txt

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

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

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