class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: E = None
        self.o: G = None
        self.r: F = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.o: G = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: J = None
        self.x: A = None
        self.p: D = None
        self.y: A = None
        self.w: J = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.o: G = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: J = None
        self.x: A = None
        self.p: D = None
        self.y: A = None
        self.w: J = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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