class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.w: J = None
        self.p: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: J = None
        self.o: I = None
        self.q: J = None
        self.w: I = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.u: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: J = None
        self.r: H = None
        self.s: J = None
        self.v: J = None
        self.o: B = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: J = None
        self.o: I = None
        self.q: J = None
        self.w: I = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.u: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: J = None
        self.r: H = None
        self.s: J = None
        self.v: J = None
        self.o: B = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.txt = txt

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

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