class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.p: G = None
        self.y: D = None
        self.z: J = None
        self.r: A = None
        self.q: G = None
        self.x: C = 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.p: A = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.y: D = None
        self.w: J = None
        self.v: E = None
        self.s: F = None
        self.x: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.p: G = None
        self.y: D = None
        self.z: J = None
        self.r: A = None
        self.q: G = None
        self.x: C = 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.p: A = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.y: D = None
        self.w: J = None
        self.v: E = None
        self.s: F = None
        self.x: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.txt = txt

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

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