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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: E = None
        self.s: F = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: H = None
        self.q: H = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: E = None
        self.s: F = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: H = None
        self.q: H = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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