class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.s: A = None
        self.r: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.r: D = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.r: G = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.s: A = None
        self.r: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.r: D = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.r: G = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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