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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: G = None
        self.u: G = None
        self.o: A = None
        self.s: J = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.q: F = None
        self.v: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.z: J = None
        self.y: F = None
        self.r: E = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.u: E = None
        self.o: F = None
        self.r: I = None
        self.s: D = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

f = A("f")
l = B("l")
g = C("g")
k = D("k")
d = E("d")
b = F("b")
i = G("i")
h = H("h")
c = I("c")
n = J("n")

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: G = None
        self.u: G = None
        self.o: A = None
        self.s: J = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.q: F = None
        self.v: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.z: J = None
        self.y: F = None
        self.r: E = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.u: E = None
        self.o: F = None
        self.r: I = None
        self.s: D = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

f = A("f")
l = B("l")
g = C("g")
k = D("k")
d = E("d")
b = F("b")
i = G("i")
h = H("h")
c = I("c")
n = J("n")

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