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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: A = None
        self.w: D = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: H = None
        self.p: I = None
        self.v: C = None
        self.o: C = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: A = None
        self.w: D = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: H = None
        self.p: I = None
        self.v: C = None
        self.o: C = None
        self.x: F = None
        self.txt = txt

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

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