class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.v: G = None
        self.r: I = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.v: E = None
        self.r: D = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.v: E = None
        self.r: D = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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