class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.v: I = None
        self.r: E = None
        self.w: G = None
        self.o: E = None
        self.z: I = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: D = None
        self.z: D = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.o: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: J = None
        self.y: F = None
        self.s: D = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: D = None
        self.z: D = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.o: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: J = None
        self.y: F = None
        self.s: D = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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