class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.s: B = None
        self.t: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.p: B = None
        self.t: G = None
        self.v: H = None
        self.y: G = None
        self.r: C = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.u: E = None
        self.p: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.p: B = None
        self.t: G = None
        self.v: H = None
        self.y: G = None
        self.r: C = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.u: E = None
        self.p: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

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